-
Notifications
You must be signed in to change notification settings - Fork 42
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
Conversation
Not all files needed ot be changed, and maybe some of these changes won't make a difference.
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 |
The method is stull buggy, a comment was added.
Revision_info=CbrainFileRevision[__FILE__] #:nodoc: | ||
|
||
# Iterator that validates a username, UNIX style | ||
def validate_each(object, attribute, value) #:nodoc: |
There was a problem hiding this comment.
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?
There is a regex on line 744 of BarinPortal/public/javascripts/userfiles.js that still has ^ and $ |
That's because it's javascript code, and javascript regex don't support \A and \z |
This RegEx audit should extend to the plugins as well |
I already looked at the plugins, there's not much to change there. |
Not all files needed ot be changed, and maybe some of these
changes won't make a difference.