Skip to content

validate OIDC authorize form's client_id parameter does not contain null byte#4555

Merged
mitchellhenke merged 1 commit intomasterfrom
mitchellhenke/fix-null-byte-error
Jan 4, 2021
Merged

validate OIDC authorize form's client_id parameter does not contain null byte#4555
mitchellhenke merged 1 commit intomasterfrom
mitchellhenke/fix-null-byte-error

Conversation

@mitchellhenke
Copy link
Contributor

We're returning a 500 if the client_id parameter contains a null byte: New Relic

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was hoping to use validate_client_id, but service_provider gets called in #initialize, so the error occurs before any validations happen.

Copy link
Contributor

@zachmargolis zachmargolis left a comment

Choose a reason for hiding this comment

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

LGTM

@mitchellhenke mitchellhenke force-pushed the mitchellhenke/fix-null-byte-error branch from 532c651 to b8ec53d Compare January 4, 2021 21:28
@aduth
Copy link
Contributor

aduth commented Jan 4, 2021

Quick (non-blocking) thought: Would this be a more widespread issue than just this one lookup? If so, is there a case for broader handling, e.g. Rack middleware?

@mitchellhenke
Copy link
Contributor Author

Yeah, I think there's a decent case to be made. I don't think there are any places where a null byte would be allowed?

@mitchellhenke mitchellhenke merged commit c4c5852 into master Jan 4, 2021
@mitchellhenke mitchellhenke deleted the mitchellhenke/fix-null-byte-error branch January 4, 2021 21:58
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.

3 participants