Skip to content
This repository has been archived by the owner on Jun 14, 2023. It is now read-only.

Scope verification could confuse substrings #1

Open
pfrazee opened this issue Dec 31, 2016 · 1 comment
Open

Scope verification could confuse substrings #1

pfrazee opened this issue Dec 31, 2016 · 1 comment

Comments

@pfrazee
Copy link

pfrazee commented Dec 31, 2016

This bit right here: https://github.com/township/township-access/blob/master/index.js#L60

You could end up having a problem if one scope is a substring of another.

We can solve this with a regex, like new RegExp('/[^,]' + scope + [,$]/').

@sethvincent
Copy link
Contributor

Oh, yep. Thanks for catching that!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants