Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
8201c62b
Commit
8201c62b
authored
Aug 04, 2016
by
Per von Zweigbergk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Style cleanup (ran make stylefix)
parent
3a44d732
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
26 deletions
+25
-26
SystemhealthController.php
...llers/OPNsense/Diagnostics/Api/SystemhealthController.php
+0
-1
AuthenticationFactory.php
...e/mvc/app/library/OPNsense/Auth/AuthenticationFactory.php
+19
-19
LocalTOTP.php
src/opnsense/mvc/app/library/OPNsense/Auth/LocalTOTP.php
+3
-3
Voucher.php
src/opnsense/mvc/app/library/OPNsense/Auth/Voucher.php
+3
-3
No files found.
src/opnsense/mvc/app/controllers/OPNsense/Diagnostics/Api/SystemhealthController.php
View file @
8201c62b
...
...
@@ -603,5 +603,4 @@ class SystemhealthController extends ApiControllerBase
}
return
$intfmap
;
}
}
src/opnsense/mvc/app/library/OPNsense/Auth/AuthenticationFactory.php
View file @
8201c62b
...
...
@@ -65,7 +65,7 @@ class AuthenticationFactory
{
$connectors
=
array
();
foreach
(
glob
(
__DIR__
.
"/*.php"
)
as
$filename
)
{
$pathParts
=
explode
(
'/'
,
$filename
);
$pathParts
=
explode
(
'/'
,
$filename
);
$vendor
=
$pathParts
[
count
(
$pathParts
)
-
3
];
$module
=
$pathParts
[
count
(
$pathParts
)
-
2
];
$classname
=
explode
(
'.php'
,
$pathParts
[
count
(
$pathParts
)
-
1
])[
0
];
...
...
src/opnsense/mvc/app/library/OPNsense/Auth/LocalTOTP.php
View file @
8201c62b
...
...
@@ -206,7 +206,7 @@ class LocalTOTP extends Local
$fields
[
"otpLength"
][
"options"
][
"6"
]
=
"6"
;
$fields
[
"otpLength"
][
"options"
][
"8"
]
=
"8"
;
$fields
[
"otpLength"
][
"help"
]
=
gettext
(
"Token length to use"
);
$fields
[
"otpLength"
][
"validate"
]
=
function
(
$value
)
{
$fields
[
"otpLength"
][
"validate"
]
=
function
(
$value
)
{
if
(
!
in_array
(
$value
,
array
(
6
,
8
)))
{
return
array
(
gettext
(
"Only token lengths of 6 or 8 characters are supported"
));
}
else
{
...
...
@@ -219,7 +219,7 @@ class LocalTOTP extends Local
$fields
[
"timeWindow"
][
"default"
]
=
null
;
$fields
[
"timeWindow"
][
"help"
]
=
gettext
(
"The time period in which the token will be valid,"
.
" default is 30 seconds (google authenticator)"
)
;
$fields
[
"timeWindow"
][
"validate"
]
=
function
(
$value
)
{
$fields
[
"timeWindow"
][
"validate"
]
=
function
(
$value
)
{
if
(
!
empty
(
$value
)
&&
filter_var
(
$value
,
FILTER_SANITIZE_NUMBER_INT
)
!=
$value
)
{
return
array
(
gettext
(
"Please enter a valid time window in seconds"
));
}
else
{
...
...
@@ -232,7 +232,7 @@ class LocalTOTP extends Local
$fields
[
"graceperiod"
][
"default"
]
=
null
;
$fields
[
"graceperiod"
][
"help"
]
=
gettext
(
"Time in seconds in which this server and the token may differ,"
.
" default is 10 seconds. Set higher for a less secure easier match."
);
$fields
[
"graceperiod"
][
"validate"
]
=
function
(
$value
)
{
$fields
[
"graceperiod"
][
"validate"
]
=
function
(
$value
)
{
if
(
!
empty
(
$value
)
&&
filter_var
(
$value
,
FILTER_SANITIZE_NUMBER_INT
)
!=
$value
)
{
return
array
(
gettext
(
"Please enter a valid grace period in seconds"
));
}
else
{
...
...
src/opnsense/mvc/app/library/OPNsense/Auth/Voucher.php
View file @
8201c62b
...
...
@@ -401,7 +401,7 @@ class Voucher implements IAuthConnector
$fields
[
"simplePasswords"
][
"name"
]
=
gettext
(
"Use simple passwords (less secure)"
);
$fields
[
"simplePasswords"
][
"type"
]
=
"checkbox"
;
$fields
[
"simplePasswords"
][
"help"
]
=
gettext
(
"Use simple (less secure) passwords, which are easier to read"
)
;
$fields
[
"simplePasswords"
][
"validate"
]
=
function
(
$value
)
{
$fields
[
"simplePasswords"
][
"validate"
]
=
function
(
$value
)
{
return
array
();
};
$fields
[
"usernameLength"
]
=
array
();
...
...
@@ -409,7 +409,7 @@ class Voucher implements IAuthConnector
$fields
[
"usernameLength"
][
"type"
]
=
"text"
;
$fields
[
"usernameLength"
][
"default"
]
=
null
;
$fields
[
"usernameLength"
][
"help"
]
=
gettext
(
"Specify alternative username length for generating vouchers"
);
$fields
[
"usernameLength"
][
"validate"
]
=
function
(
$value
)
{
$fields
[
"usernameLength"
][
"validate"
]
=
function
(
$value
)
{
if
(
!
empty
(
$value
)
&&
filter_var
(
$value
,
FILTER_SANITIZE_NUMBER_INT
)
!=
$value
)
{
return
array
(
gettext
(
"Username length must be a number or empty for default."
));
}
else
{
...
...
@@ -421,7 +421,7 @@ class Voucher implements IAuthConnector
$fields
[
"passwordLength"
][
"type"
]
=
"text"
;
$fields
[
"passwordLength"
][
"default"
]
=
null
;
$fields
[
"passwordLength"
][
"help"
]
=
gettext
(
"Specify alternative password length for generating vouchers"
);
$fields
[
"passwordLength"
][
"validate"
]
=
function
(
$value
)
{
$fields
[
"passwordLength"
][
"validate"
]
=
function
(
$value
)
{
if
(
!
empty
(
$value
)
&&
filter_var
(
$value
,
FILTER_SANITIZE_NUMBER_INT
)
!=
$value
)
{
return
array
(
gettext
(
"Password length must be a number or empty for default."
));
}
else
{
...
...
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