Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
fusiondirectory
fusiondirectory-plugins
Commits
e21d73e5
Commit
e21d73e5
authored
Dec 08, 2014
by
Côme Bernigaud
Committed by
Benoit Mortier
Dec 10, 2014
Browse files
Fixes
#3511
Fixed ssh keys regexp: comment is not mandatory
parent
1511bcfa
Changes
1
Hide whitespace changes
Inline
Side-by-side
ssh/personal/ssh/class_sshAccount.inc
View file @
e21d73e5
...
@@ -22,17 +22,17 @@
...
@@ -22,17 +22,17 @@
class
SSHPublicKeyAttribute
extends
FileTextAreaAttribute
class
SSHPublicKeyAttribute
extends
FileTextAreaAttribute
{
{
/* cache for key extracted informations */
/* cache for key extracted informations */
protected
$format
=
'/^([-a-zA-Z0-9]+(=".*")?,?)*\s*(ssh-(dss|rsa))\s+([a-zA-Z0-9+\/.=]+)\s+([[:graph:]]+)\s*$/'
;
protected
$format
=
'/^([-a-zA-Z0-9]+(=".*")?,?)*\s*(ssh-(dss|rsa))\s+([a-zA-Z0-9+\/.=]+)
(
\s+([[:graph:]]+)
)?
\s*$/'
;
function
getArrayValue
()
function
getArrayValue
()
{
{
if
(
preg_match
(
$this
->
format
,
$this
->
value
,
$match
))
{
if
(
preg_match
(
$this
->
format
,
$this
->
value
,
$match
))
{
$fingerprint
=
$this
->
fingerprint
(
base64_decode
(
$match
[
5
]));
$fingerprint
=
$this
->
fingerprint
(
base64_decode
(
$match
[
5
]));
$comment
=
(
isset
(
$match
[
7
])
?
$match
[
7
]
:
''
);
return
array
(
return
array
(
(
$match
[
3
]
==
'ssh-dss'
?
'DSA'
:
'RSA'
),
(
$match
[
3
]
==
'ssh-dss'
?
'DSA'
:
'RSA'
),
$fingerprint
,
$fingerprint
,
$
match
[
6
]
$
comment
);
);
}
}
return
parent
::
getArrayValue
();
return
parent
::
getArrayValue
();
...
...
Jonathan Swaelens
@jswaelens
mentioned in issue
#1062 (closed)
·
Sep 02, 2017
mentioned in issue
#1062 (closed)
mentioned in issue #1062
Toggle commit list
Write
Preview
Supports
Markdown
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