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

Convert regex matches to equals #105

Merged
merged 1 commit into from
May 3, 2017
Merged

Convert regex matches to equals #105

merged 1 commit into from
May 3, 2017

Conversation

kevindew
Copy link
Member

@kevindew kevindew commented May 3, 2017

This changes the usage of match method on string to be use of the
equality operator. As the contents is user input it should not be
treated as a regex and there shouldn't be scenarios where a previous
match is no longer a match.

This is to fix an error that was occurring of: "premature end of
char-class: /1-1992 G-BJRT[2/"

@bevanloon
Copy link

just a quick one on the description for the PR....

"match method on string to be use of the equality operator."
to be or to use....I'm sure there's an existential joke in there somewhere :)

@kevindew
Copy link
Member Author

kevindew commented May 3, 2017

ha whoops I'll sort that

@kevindew kevindew force-pushed the fix-regex-bug branch 2 times, most recently from 23d29b2 to dfbddf6 Compare May 3, 2017 13:29
This changes how we check whether a content_id matches for
link/contacts/attachments. As the content_id is user input it should not be
treated as a regex, so the equality operator is used instead. This
shouldn't break any existing usages as nothing should have been reliant
on regexs.

This is to fix an error that was occurring of: "premature end of
char-class: /1-1992 G-BJRT[2/"
@kevindew kevindew merged commit c9babca into master May 3, 2017
@kevindew kevindew deleted the fix-regex-bug branch May 3, 2017 13:57
@fofr
Copy link
Contributor

fofr commented May 4, 2017

Any chance a failing test/test could be added to demonstrate the issue with "premature end of char-class: /1-1992 G-BJRT[2/"?

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