Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
ff3291e5
Commit
ff3291e5
authored
Jul 25, 2018
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tighten up regular expression for project names
parent
537f87a1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
app/controllers/import/bitbucket_server_controller.rb
app/controllers/import/bitbucket_server_controller.rb
+2
-2
No files found.
app/controllers/import/bitbucket_server_controller.rb
View file @
ff3291e5
...
...
@@ -4,14 +4,14 @@ class Import::BitbucketServerController < Import::BaseController
before_action
:validate_import_params
,
only:
[
:create
]
# As a basic sanity check to prevent URL injection, restrict project
# repos
ti
ory input and repository slugs to allowed characters. For Bitbucket:
# repos
it
ory input and repository slugs to allowed characters. For Bitbucket:
#
# Project keys must start with a letter and may only consist of ASCII letters, numbers and underscores (A-Z, a-z, 0-9, _).
#
# Repository names are limited to 128 characters. They must start with a
# letter or number and may contain spaces, hyphens, underscores, and periods.
# (https://community.atlassian.com/t5/Answers-Developer-Questions/stash-repository-names/qaq-p/499054)
VALID_BITBUCKET_CHARS
=
/\A[a-zA-z0-9\-_\.\s]
*$
/
VALID_BITBUCKET_CHARS
=
/\A[a-zA-z0-9\-_\.\s]
+\z
/
SERVER_ERRORS
=
[
SocketError
,
OpenSSL
::
SSL
::
SSLError
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment