Skip to content
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

GUID validation is incorrect #19

Closed
JakubDolba opened this issue Jun 13, 2019 · 2 comments · Fixed by #22
Closed

GUID validation is incorrect #19

JakubDolba opened this issue Jun 13, 2019 · 2 comments · Fixed by #22

Comments

@JakubDolba
Copy link
Contributor

JakubDolba commented Jun 13, 2019

current \SilverStripe\SAML\Helpers\SAMLHelper::validGuid allows:

  • only uppercase "guid"
    • should be case insensitive
  • allows actually invalid values to be considered as valid
    • standard guid should be hex range [0-9a-f]
    • current implementation check [A-Z0-9] which allows non-guid to pass validation

expected result of validation: only valid guid format is passing

@robbieaverill
Copy link
Contributor

Can you please provide some basic examples of what you're finding correct and incorrect? Are you saying that we should only accept A-F range rather than A-Z?

@JakubDolba
Copy link
Contributor Author

"textual representation of UUID are represented as 32 hexadecimal (base-16) digits"
source: https://en.wikipedia.org/wiki/Universally_unique_identifier

  • sometimes (microsoft) surrounds guid with brackets { }

only [0-9A-F] range should be accepted as for example Z is not valid character of guid

example:
valid: 11111111-1111-1111-ffff-000000000000
invalid: 11111111-zzzz-1111-ffff-000000000000

created pull request #22

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 a pull request may close this issue.

2 participants