mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-10 15:35:49 +01:00
Reject custom namespace with number from 0 to 999
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
package sonia.scm.repository;
|
||||
|
||||
import sonia.scm.plugin.Extension;
|
||||
@@ -37,7 +37,7 @@ public class CustomNamespaceStrategy implements NamespaceStrategy {
|
||||
|
||||
doThrow()
|
||||
.violation("invalid namespace", "namespace")
|
||||
.when(!ValidationUtil.isRepositoryNameValid(namespace));
|
||||
.when(!ValidationUtil.isRepositoryNameValid(namespace) || namespace.matches("[0-9]{1,3}"));
|
||||
|
||||
return namespace;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user