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

Audit of regexps: ^ become \A, $ become \Z #482

Merged
merged 4 commits into from
Sep 22, 2016
Merged

Conversation

prioux
Copy link
Member

@prioux prioux commented Sep 6, 2016

Not all files needed ot be changed, and maybe some of these
changes won't make a difference.

Not all files needed ot be changed, and maybe some of these
changes won't make a difference.
@prioux prioux added the Security label Sep 6, 2016
@prioux prioux added this to the 4.6.0 milestone Sep 6, 2016
@crocodoyle
Copy link
Contributor

I think we need \z instead of \Z, because unfortunately \Z matches a line ending at the end of the string, which is not what we want

@prioux prioux closed this Sep 6, 2016
@prioux prioux deleted the regex_audit branch September 6, 2016 22:32
@prioux prioux restored the regex_audit branch September 6, 2016 22:35
@prioux prioux reopened this Sep 6, 2016
Revision_info=CbrainFileRevision[__FILE__] #:nodoc:

# Iterator that validates a username, UNIX style
def validate_each(object, attribute, value) #:nodoc:
Copy link
Contributor

Choose a reason for hiding this comment

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

You have a nodoc here but there is in fact documentation. Maybe remove it?

@crocodoyle
Copy link
Contributor

There is a regex on line 744 of BarinPortal/public/javascripts/userfiles.js that still has ^ and $

@prioux
Copy link
Member Author

prioux commented Sep 7, 2016

That's because it's javascript code, and javascript regex don't support \A and \z

@crocodoyle
Copy link
Contributor

This RegEx audit should extend to the plugins as well

@prioux
Copy link
Member Author

prioux commented Sep 21, 2016

I already looked at the plugins, there's not much to change there.

@prioux prioux merged commit d2709f7 into aces:dev Sep 22, 2016
@prioux prioux deleted the regex_audit branch September 29, 2016 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants