-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Fixing valid-id in regex #647
Conversation
Signed-off-by: rajasec <rajasec79@gmail.com>
@@ -26,7 +26,7 @@ const ( | |||
) | |||
|
|||
var ( | |||
idRegex = regexp.MustCompile(`^[\w_-]+$`) | |||
idRegex = regexp.MustCompile(`^[\w-\.]+$`) |
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.
FWIW, I'm fairly sure most regex implementations consider [.]
to mean the literal .
character (not "any" character, since [.]
would be meaningless otherwise).
But without this change, "." is not accepted as valid ID by runc. So I've added part of idregex so that dot is also accepted. |
Sorry, what I was saying is that you can write it as |
@cyphar |
@crosbymichael @mrunalp @hqhq |
LGTM |
1 similar comment
LGTM |
Honestly, this restriction should not exist. My deployment tools allow some odd ids, my filesystem allows odd file names, and then comes an intermediate layer (runc) telling they cannot be together. Just let it crash, it's out of scope. At least add a comment about why you think this restriction is needed. So nobody will ask again. |
On Fri, Mar 18, 2016 at 10:51:59AM -0700, Igor Pashev wrote:
Related discussion in [1,2]. Since this seems like a spec issue
|
…-device-path config-linux: Add restriction for duplicated device path
Fixes #635
Also removed _ ,as _ is part of \w
Signed-off-by: rajasec rajasec79@gmail.com