Skip to content

Replace sscanf by equivalent native PHP functions because sscanf can be disabled for security reasons. #286

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 9, 2020

Conversation

niconoe-
Copy link
Contributor

@niconoe- niconoe- commented Feb 1, 2020

As sscanf can be disabled for security reasons, as mentioned in #270 , and also explained here: https://www.php.net/manual/en/function.sscanf.php#49713, I changed the usages by other native PHP functions, so performance should not be impacted.

Fixes: #270

Copy link
Member

@williamdes williamdes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for fixing this issue!

@williamdes
Copy link
Member

@codecov
Copy link

codecov bot commented Feb 2, 2020

Codecov Report

Merging #286 into QA will decrease coverage by 0.24%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##               QA     #286      +/-   ##
==========================================
- Coverage     100%   99.75%   -0.25%     
- Complexity   1864     1865       +1     
==========================================
  Files          63       63              
  Lines        4527     4525       -2     
==========================================
- Hits         4527     4514      -13     
- Misses          0       11      +11

@williamdes
Copy link
Member

Can you run ./vendor/bin/phpcbf and commit the coding standard fixes
The PR will be okay after that

Copy link
Contributor Author

@niconoe- niconoe- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Member

@williamdes williamdes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!
I will merge your work near the 8th

@williamdes williamdes self-assigned this Feb 9, 2020
@williamdes williamdes added this to the 4.5.1 milestone Feb 9, 2020
@williamdes williamdes changed the base branch from master to QA February 9, 2020 12:19
…s because sscanf can be disabled for security reasons.

Fixes: phpmyadmin#270
williamdes added a commit that referenced this pull request Feb 9, 2020
…e sscanf can be disabled for security reasons.

Pull-request: #286
Fixes: #270

Signed-off-by: William Desportes <[email protected]>
williamdes added a commit that referenced this pull request Feb 9, 2020
Pull-request: #286

Signed-off-by: William Desportes <[email protected]>
@williamdes williamdes merged commit 8ea41bc into phpmyadmin:QA Feb 9, 2020
@williamdes
Copy link
Member

Thank you @niconoe- that will reduce errors being reported to our server 🎉

@niconoe- niconoe- deleted the fix-issue-270 branch February 27, 2023 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sscanf() has been disabled for security reasons
3 participants