Closed
Bug 466222
Opened 17 years ago
Closed 17 years ago
update hg_helper.py on hg.m.o to know that '.' and '/' are valid characters in repository names
Categories
(mozilla.org Graveyard :: Server Operations, task)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: bhearsum, Assigned: aravind)
References
Details
Attachments
(1 file)
|
678 bytes,
patch
|
Details | Diff | Splinter Review |
The interactive cloning seems to bypass the name validation, but it is currently impossible to clone releases/mozilla-1.9.1 to a user repository via the 'ssh hg.m.o clone mymoz releases/mozilla-1.9.1' both because of the '/' and the '.'.
I don't think this could be a security risk - neither of these are special characters.
Attachment #349482 -
Flags: review?(aravind)
| Assignee | ||
Updated•17 years ago
|
Assignee: server-ops → aravind
| Reporter | ||
Comment 1•17 years ago
|
||
any update here?
| Assignee | ||
Comment 2•17 years ago
|
||
I will work on updating the script this week. Should probably be ready sometime next week or so.
| Reporter | ||
Comment 3•17 years ago
|
||
Is the patch which I attached not enough?
| Assignee | ||
Comment 4•17 years ago
|
||
I haven't had a chance to look at it. Will do this week and integrate it into the script we have running. Also the current script is different from the prev version + your previous patches, so your patches may be all be applicable.
| Assignee | ||
Comment 5•17 years ago
|
||
I am not sure this is valid. I was able to clone it exactly the way you described above. Here is the output from my session.
~ $ssh hg.mozilla.org clone mymoz releases/mozilla-1.9.1
Cloning /releases/mozilla-1.9.1 to /users/aravind_mozilla.com/mymoz
(wait about 8 minutes..)
Clone complete.
Fixing permissions
(wait a few more minutes..)
~ $
What the check_repo does is prevent users from naming their repos with a . and / in it. Otherwise things should be working correctly already. Am I missing the point of this bug? Did you want me to allow the . and / characters in user repos?
| Reporter | ||
Comment 6•17 years ago
|
||
Hm, good point!
Unless there's a reason not to it would be nice to allow '.' in user repository names, though.
| Assignee | ||
Comment 7•17 years ago
|
||
Okay, will figure out a way to allow that, should be done sometime today.
| Assignee | ||
Comment 8•17 years ago
|
||
Done, you can now have a repo with a . in the name.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Comment 9•17 years ago
|
||
Probably even more trivial than this bug was about, but does this allow:
/^\.[a-zA-Z\.]/ as a repo name (yea regex, if you want 'english' I can too)
The problem I see is pending how we serve up the info here, it may hide the repo from the public or even make it less discoverable for IT if they ever need to touch-up stuff there... (I'm not sure if it is a problem in practice basically)
| Assignee | ||
Comment 10•17 years ago
|
||
(In reply to comment #9)
> Probably even more trivial than this bug was about, but does this allow:
> /^\.[a-zA-Z\.]/ as a repo name (yea regex, if you want 'english' I can too)
Actually, it shouldn't allow that. Here is the regex that checks a user repos name.
def check_repo_name (repo_name):
good_chars = re.compile ('^(\w|-|\w\.\w)+$')
if not good_chars.search (repo_name):
sys.stderr.write ('Only alpha-numeric characters, ".", and "-" are allowed in the repository names.\n')
sys.stderr.write ('Please try again with only those characters.\n')
sys.exit (1)
return 1
| Reporter | ||
Updated•17 years ago
|
Attachment #349482 -
Flags: review?(aravind)
| Reporter | ||
Comment 11•17 years ago
|
||
Looks like this never got fixed.
bitters-2:tmp bhearsum$ ssh hg.mozilla.org clone mozilla-1.9.1 releases/mozilla-1.9.1
Only alpha-numeric characters, ".", and "-" are allowed in the repository names.
Please try again with only those characters.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
| Assignee | ||
Comment 12•17 years ago
|
||
The regex wasn't permissive enough. I changed it to
def check_repo_name (repo_name):
good_chars = re.compile ('^(\w|-|.\w)+$')
if not good_chars.search (repo_name):
sys.stderr.write ('Only alpha-numeric characters, ".", and "-" are allowed in the repository names.\n')
sys.stderr.write ('Please try again with only those characters.\n')
sys.exit (1)
return 1
Seems to be working now.
Status: REOPENED → RESOLVED
Closed: 17 years ago → 17 years ago
Resolution: --- → FIXED
| Assignee | ||
Comment 13•17 years ago
|
||
oops, I meant good_chars = re.compile ('^(\w|-|\.\w)+$')
Updated•11 years ago
|
Product: mozilla.org → mozilla.org Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•