[PATCH v3] models: Validate Project.linkname does not contain forward slash

2020-09-28 Thread Thomas Bracht Laumann Jespersen
or instead of just rejecting inputs that contain forward slashes. Signed-off-by: Thomas Bracht Laumann Jespersen --- .../0044_add_project_linkname_validation.py | 30 +++ patchwork/models.py | 4 ++- 2 files changed, 33 insertions(+), 1 deletion(-) c

Re: [PATCH v2] models: Validate Project.linkname does not contain forward slash

2020-09-26 Thread Thomas Bracht Laumann Jespersen
> Thanks! This is one of those things you just assume people are doing so > you never bother enforcing it :) In hindsight, the 'Project.linkname' > field is supposed to be a slug - that is, restricted to letters, > numbers, underscores and hyphens. You'd use 'Project.name' if you > wanted more

[PATCH v2] models: Validate Project.linkname does not contain forward slash

2020-09-08 Thread Thomas Bracht Laumann Jespersen
arguments '{'project_id': 'foo/bar'}' not found. 1 pattern(s) tried: ['project/(?P[^/]+)/list/$'] which appears to explicitly disallow forward slashes. So I think it makes sense to validate that project linkname doesn't contain forward slahes. Signed-off-by: Thomas Bracht Laumann Jespersen --- I

Re: [PATCH] models: Validate Project.linkname does not contain forward slash

2020-09-08 Thread Thomas Bracht Laumann Jespersen
> > I hard a hard time satisfying flake8, so I ended up disabling the pre-commit > > hook. I also looked over the documentation for contributors and figure that > > if > > a release note is required, just let me know then I'll add it. > > TIL we have precommit hooks. I've been contributing to

[PATCH] models: Validate Project.linkname does not contain forward slash

2020-09-06 Thread Thomas Bracht Laumann Jespersen
arguments '{'project_id': 'foo/bar'}' not found. 1 pattern(s) tried: ['project/(?P[^/]+)/list/$'] which appears to explicitly disallow forward slashes. So I think it makes sense to validate that project linkname doesn't contain forward slahes. Signed-off-by: Thomas Bracht Laumann Jespersen --- I h