guardian / gu-who

answering: who are all these users in my GitHub org?
https://gu-who.herokuapp.com/
Apache License 2.0
225 stars 56 forks source link

Fix regex for github personal access tokens. #75

Closed markjamesbutler closed 3 years ago

markjamesbutler commented 3 years ago

Updated regex as it was failing to validate valid github personal access tokens.

What does this change?

Fixes the regex so valid personal access tokens from github can be used.

How to test

Run the application locally as described here. Create a personal access token as described here. Paste in the access token. Note the application works as expected.

You can try against the main version to verify your access token is not accepted.

How can we measure success?

It's possible to run the application using personal access tokens.

Have we considered potential risks?

The regex is wrong and incorrectly accepts invalid access tokens. I have done some research and it seems the regex is correct but I cannot find any official github documentation to support this.

Images

n/a

rtyley commented 3 years ago

That all makes sense -thanks!

prout-bot commented 3 years ago

Seen on PROD (created by @markjamesbutler and merged by @rtyley 5 minutes and 22 seconds ago) Please check your changes!