Matija Čupić
9a5ba5c674
Add more information in variable_duplicates validator error message
2018-02-13 23:51:04 +01:00
Matija Čupić
e5d9f4a374
Add specs for VariableDuplicates validator
2018-02-13 17:52:33 +01:00
Douwe Maan
a03d29da1d
Validate User username only on Namespace, and bubble up appropriately
2018-02-06 12:09:03 -06:00
Douwe Maan
a10925e1c3
Reallow project paths ending in periods
2017-11-06 14:46:53 +01:00
Robert Speicher
72a7b30c9f
Change all :empty_project
to :project
2017-08-02 17:47:31 -04:00
Robert Speicher
9513bd18c4
Ensure all project factories use :repository
trait or :empty_project
2017-08-01 14:51:52 -04:00
Bob Van Landuyt
79393a351d
Rebuild the dynamic path before validating it
...
Otherwise we won't validate updates to the path. Allowing users to
change the path to something that's not allowed.
2017-06-21 16:09:35 +02:00
Bob Van Landuyt
33aed43e9d
Avoid crash when trying to parse string with invalid UTF-8 sequence
2017-05-30 15:05:52 +00:00
Douwe Maan
43b1750892
Revert "Remove changes that are not absolutely necessary"
...
This reverts commit b0498c176f
2017-05-24 20:59:26 +00:00
Douwe Maan
b0498c176f
Remove changes that are not absolutely necessary
2017-05-23 20:38:35 -05:00
Douwe Maan
4345bb8c50
Fix ambiguous routing issues by teaching router about reserved words
2017-05-23 20:38:24 -05:00
Bob Van Landuyt
e2b9420c11
Add a better error message when a certain path is missing
2017-05-02 11:48:54 +02:00
Bob Van Landuyt
a035ebbe06
Update path validation & specs
2017-05-02 10:47:01 +02:00
Bob Van Landuyt
c853dd6158
Reuse Gitlab::Regex.full_namespace_regex in the DynamicPathValidator
2017-05-02 09:13:41 +02:00
Bob Van Landuyt
08b1bc3489
Reject group-routes as names of child namespaces
2017-05-01 11:14:24 +02:00
Bob Van Landuyt
1e14c3c852
Reject paths following namespace for paths including 2 *
...
Reject the part following `/*namespace_id/:project_id` for paths
containing 2 wildcard parameters
2017-05-01 11:14:24 +02:00
Bob Van Landuyt
ea8e86dac8
Use %r{}
regexes to avoid having to escape /
2017-05-01 11:14:24 +02:00
Bob Van Landuyt
e50f4bc066
The dynamic path validator can block out partial paths
...
So we can block `objects` only when it is contained in `info/lfs` or `gitlab-lfs`
2017-05-01 11:14:24 +02:00
Bob Van Landuyt
c5059cb4f7
Make path validation case-insensitive
2017-05-01 11:14:24 +02:00
Bob Van Landuyt
bccf8d86c5
Rename NamespaceValidator
to DynamicPathValidator
...
This reflects better that it validates paths instead of a namespace model
2017-05-01 11:14:24 +02:00
Bob Van Landuyt
f7511caa5f
Split off validating full paths
...
The first part of a full path needs to be validated as a `top_level`
while the rest need to be validated as `wildcard`
2017-05-01 11:14:24 +02:00
Bob Van Landuyt
e4f5b7ca21
Improve detection of reserved words from routes
2017-05-01 11:14:24 +02:00
Bob Van Landuyt
74fcccaab3
Streamline the path validation in groups & projects
...
`Project` uses `ProjectPathValidator` which is now a
`NamespaceValidator` that skips the format validation.
That way we're sure we are using the same collection of reserved
paths.
I updated the path constraints to reflect the changes: We now allow
some values that are only used on a top level namespace as a name for
a nested group/project.
2017-05-01 11:14:24 +02:00
Bob Van Landuyt
536f2bdfd1
Add forbidden paths to the namespace validator
2017-05-01 11:14:23 +02:00