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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
8e639cc6
Commit
8e639cc6
authored
Jul 23, 2019
by
Matija Čupić
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow masking @ and : characters
parent
d892e80b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
app/models/concerns/maskable.rb
app/models/concerns/maskable.rb
+1
-1
spec/javascripts/ci_variable_list/ajax_variable_list_spec.js
spec/javascripts/ci_variable_list/ajax_variable_list_spec.js
+1
-1
spec/javascripts/ci_variable_list/ci_variable_list_spec.js
spec/javascripts/ci_variable_list/ci_variable_list_spec.js
+1
-1
No files found.
app/models/concerns/maskable.rb
View file @
8e639cc6
...
...
@@ -9,7 +9,7 @@ module Maskable
# * No spaces
# * Minimal length of 8 characters from the Base64 alphabets (RFC4648)
# * Absolutely no fun is allowed
REGEX
=
/\A[a-zA-Z0-9_+=\/-]{8,}\z/
.
freeze
REGEX
=
/\A[a-zA-Z0-9_+=\/
@:
-]{8,}\z/
.
freeze
included
do
validates
:masked
,
inclusion:
{
in:
[
true
,
false
]
}
...
...
spec/javascripts/ci_variable_list/ajax_variable_list_spec.js
View file @
8e639cc6
...
...
@@ -224,7 +224,7 @@ describe('AjaxFormVariableList', () => {
describe
(
'
maskableRegex
'
,
()
=>
{
it
(
'
takes in the regex provided by the data attribute
'
,
()
=>
{
expect
(
container
.
dataset
.
maskableRegex
).
toBe
(
'
^[a-zA-Z0-9_+=/-]{8,}$
'
);
expect
(
container
.
dataset
.
maskableRegex
).
toBe
(
'
^[a-zA-Z0-9_+=/
@:
-]{8,}$
'
);
expect
(
ajaxVariableList
.
maskableRegex
).
toBe
(
container
.
dataset
.
maskableRegex
);
});
});
...
...
spec/javascripts/ci_variable_list/ci_variable_list_spec.js
View file @
8e639cc6
...
...
@@ -162,7 +162,7 @@ describe('VariableList', () => {
});
it
(
'
has a regex provided via a data attribute
'
,
()
=>
{
expect
(
$wrapper
.
attr
(
'
data-maskable-regex
'
)).
toBe
(
'
^[a-zA-Z0-9_+=/-]{8,}$
'
);
expect
(
$wrapper
.
attr
(
'
data-maskable-regex
'
)).
toBe
(
'
^[a-zA-Z0-9_+=/
@:
-]{8,}$
'
);
});
it
(
'
allows values that are 8 characters long
'
,
done
=>
{
...
...
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