-
Notifications
You must be signed in to change notification settings - Fork 24
Realnames #96
base: master
Are you sure you want to change the base?
Realnames #96
Changes from 1 commit
ed22f70
3a61c26
300ada3
d3078f7
fec33b9
1a2f01c
bdba277
2dff67e
e3dea7f
30b9399
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
Changed minimum real name length to 1 character.
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -601,7 +601,7 @@ def run(self, user_name): | |
| except NotFound: | ||
| return user_name | ||
|
|
||
| realname_rx = re.compile(ur"^[\w\s\-]{3,40}$", re.UNICODE) | ||
| realname_rx = re.compile(ur"^[\w\s\-]{1,40}$", re.UNICODE) | ||
|
|
||
| def chkrealname(x): | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This doesn't match the pattern for function names in this codebase. Can you change it to (say) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually, these should be methods on the validator object. |
||
| try: | ||
|
|
@@ -614,7 +614,7 @@ def chkrealname(x): | |
| def whyrealnamebad(x): | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would fold this stuff into (what will be called) |
||
| if not x: | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Under what circumstances does |
||
| return errors.BAD_REALNAME_CHARS | ||
| if len(x)<3: | ||
| if len(x)<1: | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Per the above comments re:removing lower length limit, this could go away. |
||
| return errors.BAD_REALNAME_SHORT | ||
| if len(x)>40: | ||
| return errors.BAD_REALNAME_LONG | ||
|
|
||
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.
I don't think this needs to be compiled and run every time, but if it must I'd call it
realname_refor consistency with theremodule.