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

fix(auth): better regex match for usernames #143

Merged
merged 1 commit into from
Mar 3, 2018
Merged

Conversation

jgravois
Copy link
Contributor

@jgravois jgravois commented Mar 2, 2018

in testing #140 i noticed that sometimes my username was being reported as jgravois&persist=true when i ticked Keep me signed in

screenshot 2018-03-02 14 39 27

this regex ensures that additional parameters aren't appended to usernames accidentally when they are present by swapping in a match block that accepts anything except an &.

AFFECTS PACKAGES:
@esri/arcgis-rest-auth

TIL: ArcGIS Organizational usernames and passwords can include special characters now!

in OAuth responses usernames *might* be followed by additional parameters like persist=true or
ssl=true, this regex ensures that they arent amended to usernames accidently

AFFECTS PACKAGES:
@esri/arcgis-rest-auth
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling d38a7fb on bug/username into 4b1544f on master.

@Esri Esri deleted a comment from coveralls Mar 2, 2018
@Esri Esri deleted a comment from coveralls Mar 2, 2018
@Esri Esri deleted a comment from coveralls Mar 2, 2018
Copy link
Member

@tomwayson tomwayson left a comment

Choose a reason for hiding this comment

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

LGTM

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.

4 participants