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
a6705af8
Commit
a6705af8
authored
Jul 23, 2015
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(legacy) fix uninitilized vars in vpn_openvpn_server.php
parent
fbf5ace3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
16 deletions
+15
-16
vpn_openvpn_server.php
src/www/vpn_openvpn_server.php
+15
-16
No files found.
src/www/vpn_openvpn_server.php
View file @
a6705af8
...
@@ -48,7 +48,7 @@ $openvpn_server_modes = array(
...
@@ -48,7 +48,7 @@ $openvpn_server_modes = array(
'server_user'
=>
gettext
(
"Remote Access ( User Auth )"
),
'server_user'
=>
gettext
(
"Remote Access ( User Auth )"
),
'server_tls_user'
=>
gettext
(
"Remote Access ( SSL/TLS + User Auth )"
));
'server_tls_user'
=>
gettext
(
"Remote Access ( SSL/TLS + User Auth )"
));
if
(
!
is
_array
(
$config
[
'openvpn'
][
'openvpn-server'
]))
{
if
(
!
is
set
(
$config
[
'openvpn'
][
'openvpn-server'
]))
{
$config
[
'openvpn'
][
'openvpn-server'
]
=
array
();
$config
[
'openvpn'
][
'openvpn-server'
]
=
array
();
}
}
...
@@ -60,13 +60,13 @@ if (!is_array($config['ca'])) {
...
@@ -60,13 +60,13 @@ if (!is_array($config['ca'])) {
$a_ca
=&
$config
[
'ca'
];
$a_ca
=&
$config
[
'ca'
];
if
(
!
is_array
(
$config
[
'cert'
]))
{
if
(
!
is
set
(
$config
[
'cert'
])
||
!
is
_array
(
$config
[
'cert'
]))
{
$config
[
'cert'
]
=
array
();
$config
[
'cert'
]
=
array
();
}
}
$a_cert
=&
$config
[
'cert'
];
$a_cert
=&
$config
[
'cert'
];
if
(
!
is_array
(
$config
[
'crl'
]))
{
if
(
!
is
set
(
$config
[
'crl'
])
||
!
is
_array
(
$config
[
'crl'
]))
{
$config
[
'crl'
]
=
array
();
$config
[
'crl'
]
=
array
();
}
}
...
@@ -78,16 +78,19 @@ foreach ($a_crl as $cid => $acrl) {
...
@@ -78,16 +78,19 @@ foreach ($a_crl as $cid => $acrl) {
}
}
}
}
if
(
is_numericint
(
$_GET
[
'id'
]))
{
if
(
is
set
(
$_GET
[
'id'
])
&&
is
_numericint
(
$_GET
[
'id'
]))
{
$id
=
$_GET
[
'id'
];
$id
=
$_GET
[
'id'
];
}
}
if
(
isset
(
$_POST
[
'id'
])
&&
is_numericint
(
$_POST
[
'id'
]))
{
if
(
isset
(
$_POST
[
'id'
])
&&
is_numericint
(
$_POST
[
'id'
]))
{
$id
=
$_POST
[
'id'
];
$id
=
$_POST
[
'id'
];
}
}
$act
=
$_GET
[
'act'
];
if
(
isset
(
$_GET
[
'act'
]))
{
if
(
isset
(
$_POST
[
'act'
]))
{
$act
=
$_GET
[
'act'
];
}
elseif
(
isset
(
$_POST
[
'act'
]))
{
$act
=
$_POST
[
'act'
];
$act
=
$_POST
[
'act'
];
}
else
{
$act
=
null
;
}
}
if
(
isset
(
$id
)
&&
$a_server
[
$id
])
{
if
(
isset
(
$id
)
&&
$a_server
[
$id
])
{
...
@@ -96,7 +99,7 @@ if (isset($id) && $a_server[$id]) {
...
@@ -96,7 +99,7 @@ if (isset($id) && $a_server[$id]) {
$vpnid
=
0
;
$vpnid
=
0
;
}
}
if
(
$_GET
[
'act'
]
==
"del"
)
{
if
(
isset
(
$_GET
[
'act'
])
&&
$_GET
[
'act'
]
==
"del"
)
{
if
(
!
isset
(
$a_server
[
$id
]))
{
if
(
!
isset
(
$a_server
[
$id
]))
{
redirectHeader
(
"vpn_openvpn_server.php"
);
redirectHeader
(
"vpn_openvpn_server.php"
);
exit
;
exit
;
...
@@ -109,7 +112,7 @@ if ($_GET['act'] == "del") {
...
@@ -109,7 +112,7 @@ if ($_GET['act'] == "del") {
$savemsg
=
gettext
(
"Server successfully deleted"
)
.
"<br />"
;
$savemsg
=
gettext
(
"Server successfully deleted"
)
.
"<br />"
;
}
}
if
(
$_GET
[
'act'
]
==
"new"
)
{
if
(
isset
(
$_GET
[
'act'
])
&&
$_GET
[
'act'
]
==
"new"
)
{
$pconfig
[
'autokey_enable'
]
=
"yes"
;
$pconfig
[
'autokey_enable'
]
=
"yes"
;
$pconfig
[
'tlsauth_enable'
]
=
"yes"
;
$pconfig
[
'tlsauth_enable'
]
=
"yes"
;
$pconfig
[
'autotls_enable'
]
=
"yes"
;
$pconfig
[
'autotls_enable'
]
=
"yes"
;
...
@@ -124,7 +127,7 @@ if ($_GET['act']=="new") {
...
@@ -124,7 +127,7 @@ if ($_GET['act']=="new") {
$pconfig
[
'digest'
]
=
"SHA1"
;
$pconfig
[
'digest'
]
=
"SHA1"
;
}
}
if
(
$_GET
[
'act'
]
==
"edit"
)
{
if
(
isset
(
$_GET
[
'act'
])
&&
$_GET
[
'act'
]
==
"edit"
)
{
if
(
isset
(
$id
)
&&
$a_server
[
$id
])
{
if
(
isset
(
$id
)
&&
$a_server
[
$id
])
{
$pconfig
[
'disable'
]
=
isset
(
$a_server
[
$id
][
'disable'
]);
$pconfig
[
'disable'
]
=
isset
(
$a_server
[
$id
][
'disable'
]);
$pconfig
[
'mode'
]
=
$a_server
[
$id
][
'mode'
];
$pconfig
[
'mode'
]
=
$a_server
[
$id
][
'mode'
];
...
@@ -246,7 +249,7 @@ if ($_GET['act']=="edit") {
...
@@ -246,7 +249,7 @@ if ($_GET['act']=="edit") {
}
}
}
}
if
(
$_POST
)
{
if
(
$_POST
)
{
unset
(
$input_errors
);
$input_errors
=
array
(
);
$pconfig
=
$_POST
;
$pconfig
=
$_POST
;
if
(
isset
(
$id
)
&&
$a_server
[
$id
])
{
if
(
isset
(
$id
)
&&
$a_server
[
$id
])
{
...
@@ -659,7 +662,7 @@ function autokey_change() {
...
@@ -659,7 +662,7 @@ function autokey_change() {
function
tlsauth_change
()
{
function
tlsauth_change
()
{
<?php
if
(
!
$pconfig
[
'tls'
]
)
:
<?php
if
(
empty
(
$pconfig
[
'tls'
])
)
:
?>
?>
if
(
document
.
iform
.
tlsauth_enable
.
checked
)
if
(
document
.
iform
.
tlsauth_enable
.
checked
)
document
.
getElementById
(
"
tlsauth_opts
"
).
style
.
display
=
""
;
document
.
getElementById
(
"
tlsauth_opts
"
).
style
.
display
=
""
;
...
@@ -673,7 +676,7 @@ endif; ?>
...
@@ -673,7 +676,7 @@ endif; ?>
function
autotls_change
()
{
function
autotls_change
()
{
<?php
if
(
!
$pconfig
[
'tls'
]
)
:
<?php
if
(
empty
(
$pconfig
[
'tls'
])
)
:
?>
?>
autocheck
=
document
.
iform
.
autotls_enable
.
checked
;
autocheck
=
document
.
iform
.
autotls_enable
.
checked
;
<?php
<?php
...
@@ -815,10 +818,6 @@ function tuntap_change() {
...
@@ -815,10 +818,6 @@ function tuntap_change() {
<div
class=
"row"
>
<div
class=
"row"
>
<?php
<?php
if
(
!
$savemsg
)
{
$savemsg
=
""
;
}
if
(
isset
(
$input_errors
)
&&
count
(
$input_errors
)
>
0
)
{
if
(
isset
(
$input_errors
)
&&
count
(
$input_errors
)
>
0
)
{
print_input_errors
(
$input_errors
);
print_input_errors
(
$input_errors
);
}
}
...
...
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