Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CentralNic
pepper
Commits
4e0ffd9c
Commit
4e0ffd9c
authored
Jun 22, 2021
by
Gavin Brown
Browse files
fixed
parent
01bdae47
Changes
1
Hide whitespace changes
Inline
Side-by-side
pepper
View file @
4e0ffd9c
...
...
@@ -862,8 +862,10 @@ sub generate_authinfo {
my
$
length
=
shift
||
16
;
my
$
authinfo
;
my
@
chars
=
(
'a'
..
'z'
),
(
'A'
..
'Z'
),
(
0
-
9
),
(
'!'
,
'#'
,
'$'
,
'%'
,
'&'
,
'('
,
')'
,
'*'
,
'+'
,
','
,
'-'
,
'.'
,
'/'
,
':'
,
';'
,
'<'
,
'='
,
'>'
,
'?'
,
'['
,
']'
,
'^'
,
'_'
,
'{'
,
'|'
,
'}'
,
'~'
);
$
authinfo
.=
$
chars
[
int
(
rand
(
scalar
(@
chars
)))-
1
]
while
(
length
($
authinfo
)
<
$
length
);
my
@
chars
=
((
'a'
..
'z'
),
(
'A'
..
'Z'
),
(
0
-
9
),
(
'!'
,
'#'
,
'$'
,
'%'
,
'&'
,
'('
,
')'
,
'*'
,
'+'
,
','
,
'-'
,
'.'
,
'/'
,
':'
,
';'
,
'<'
,
'='
,
'>'
,
'?'
,
'['
,
']'
,
'^'
,
'_'
,
'{'
,
'|'
,
'}'
,
'~'
));
my
$
c
=
scalar
(@
chars
);
$
authinfo
.=
$
chars
[
int
($
c
*
rand
())-
1
]
while
(
length
($
authinfo
)
<
$
length
);
return
$
authinfo
;
}
...
...
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