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
4d336198
Commit
4d336198
authored
Apr 02, 2015
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
src: s/pfSenseHeader/redirectHeader/g plus cleanups
parent
dc757d07
Changes
22
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
125 additions
and
139 deletions
+125
-139
authgui.inc
src/etc/inc/authgui.inc
+2
-2
functions.inc
src/etc/inc/functions.inc
+73
-87
firewall_aliases_import.php
src/www/firewall_aliases_import.php
+1
-1
pkg_edit.php
src/www/pkg_edit.php
+4
-4
services_unbound_acls.php
src/www/services_unbound_acls.php
+2
-2
system_advanced_notifications.php
src/www/system_advanced_notifications.php
+1
-1
system_advanced_sysctl.php
src/www/system_advanced_sysctl.php
+2
-2
system_authservers.php
src/www/system_authservers.php
+2
-2
system_camanager.php
src/www/system_camanager.php
+6
-6
system_certmanager.php
src/www/system_certmanager.php
+7
-7
system_crlmanager.php
src/www/system_crlmanager.php
+6
-6
system_groupmanager.php
src/www/system_groupmanager.php
+2
-2
system_groupmanager_addprivs.php
src/www/system_groupmanager_addprivs.php
+2
-2
system_usermanager.php
src/www/system_usermanager.php
+6
-6
system_usermanager_addprivs.php
src/www/system_usermanager_addprivs.php
+1
-1
vpn_l2tp_users.php
src/www/vpn_l2tp_users.php
+1
-1
vpn_l2tp_users_edit.php
src/www/vpn_l2tp_users_edit.php
+1
-1
vpn_openvpn_client.php
src/www/vpn_openvpn_client.php
+1
-1
vpn_openvpn_csc.php
src/www/vpn_openvpn_csc.php
+1
-1
vpn_openvpn_export.php
src/www/vpn_openvpn_export.php
+2
-2
vpn_openvpn_export_shared.php
src/www/vpn_openvpn_export_shared.php
+1
-1
vpn_openvpn_server.php
src/www/vpn_openvpn_server.php
+1
-1
No files found.
src/etc/inc/authgui.inc
View file @
4d336198
...
...
@@ -53,7 +53,7 @@ if (!isAllowedPage($_SERVER['REQUEST_URI'])) {
$page
=
str_replace
(
'*'
,
''
,
$allowedpages
[
0
]);
$_SESSION
[
'Post_Login'
]
=
true
;
require_once
(
"functions.inc"
);
pfSense
Header
(
"/
{
$page
}
"
);
redirect
Header
(
"/
{
$page
}
"
);
$username
=
empty
(
$_SESSION
[
"Username"
])
?
"(system)"
:
$_SESSION
[
'Username'
];
if
(
!
empty
(
$_SERVER
[
'REMOTE_ADDR'
]))
{
...
...
@@ -77,7 +77,7 @@ if (!isAllowedPage($_SERVER['REQUEST_URI'])) {
if
(
!
$_SESSION
[
'Post_Login'
])
{
$_SESSION
[
'Post_Login'
]
=
true
;
require_once
(
"functions.inc"
);
pfSense
Header
(
$_SERVER
[
'REQUEST_URI'
]);
redirect
Header
(
$_SERVER
[
'REQUEST_URI'
]);
exit
;
}
...
...
src/etc/inc/functions.inc
View file @
4d336198
...
...
@@ -28,112 +28,98 @@
*/
/* BEGIN compatibility goo with HEAD */
if
(
!
function_exists
(
"gettext"
))
{
function
gettext
(
$text
)
{
return
$text
;
}
if
(
!
function_exists
(
'gettext'
))
{
function
gettext
(
$text
)
{
return
$text
;
}
if
(
!
function_exists
(
"pfSenseHeader"
))
{
/****f* functions/pfSenseHeader
* NAME
* pfSenseHeader
* INPUTS
* none
* RESULT
* Javascript header change or browser Location:
******/
function
pfSenseHeader
(
$text
)
{
global
$_SERVER
;
if
(
isAjax
())
{
if
(
$_SERVER
[
'HTTPS'
]
==
"on"
)
$protocol
=
"https"
;
else
$protocol
=
"http"
;
$port
=
":
{
$_SERVER
[
'SERVER_PORT'
]
}
"
;
if
(
$_SERVER
[
'SERVER_PORT'
]
==
"80"
&&
$protocol
==
"http"
)
$port
=
""
;
if
(
$_SERVER
[
'SERVER_PORT'
]
==
"443"
&&
$protocol
==
"https"
)
$port
=
""
;
$complete_url
=
"
{
$protocol
}
://
{
$_SERVER
[
'SERVER_NAME'
]
}{
$port
}
/
{
$text
}
"
;
echo
"
\n
document.location.href = '
{
$complete_url
}
';
\n
"
;
}
else
{
header
(
"Location:
$text
"
);
}
}
}
/* END compatibility goo with HEAD */
/*fetch menu notices function*/
if
(
!
function_exists
(
"get_menu_messages"
))
{
function
get_menu_messages
(){
global
$g
,
$config
;
if
(
are_notices_pending
())
{
$notices
=
get_notices
();
$requests
=
array
();
## Get Query Arguments from URL ###
foreach
(
$_REQUEST
as
$key
=>
$value
)
{
if
(
$key
!=
"PHPSESSID"
)
$requests
[]
=
$key
.
'='
.
$value
;
}
if
(
is_array
(
$requests
))
$request_string
=
implode
(
"&"
,
$requests
);
if
(
is_array
(
$notices
))
{
$notice_msgs
=
"<ul class=
\"
dropdown-menu
\"
role=
\"
menu
\"
>"
;
function
redirectHeader
(
$text
)
{
global
$_SERVER
;
$notice_msgs
.=
"<li><a href=
\"
#
\"
onclick=
\"
notice_action('acknowledge','all');
\"
>"
.
gettext
(
"Acknowledge All Notices"
)
.
"</a></li><li class=
\"
divider
\"
></li>"
;
if
(
isAjax
())
{
if
(
$_SERVER
[
'HTTPS'
]
==
'on'
)
{
$protocol
=
'https'
;
}
else
{
$protocol
=
'http'
;
}
foreach
(
$notices
as
$key
=>
$value
)
{
$date
=
date
(
"m-d-y H:i:s"
,
$key
);
$noticemsg
=
(
$value
[
'notice'
]
!=
""
?
$value
[
'notice'
]
:
$value
[
'id'
]);
$noticemsg
=
preg_replace
(
"/(
\"
|\'|
\n
|<.?\w+>)/i"
,
""
,
$noticemsg
);
if
((
strlen
(
$noticemsg
)
*
8
)
>
$domtt_width
)
$domtt_width
=
(
strlen
(
$noticemsg
)
*
8
);
if
((
strlen
(
$noticemsg
)
*
8
)
>
900
)
$domtt_width
=
900
;
$alert_action
=
"onclick=
\"
notice_action('acknowledge','
{
$key
}
'); jQuery(this).parent().parent().remove();
\"
"
;
$notice_msgs
.=
"<li><a href=
\"
#
\"
{
$alert_link
}
{
$alert_action
}
>
{
$date
}
[ "
.
htmlspecialchars
(
$noticemsg
)
.
"]</a></li>"
;
}
$notice_msgs
.=
"</ul>"
;
$port
=
''
;
if
(
!
(
$_SERVER
[
'SERVER_PORT'
]
==
'80'
&&
$protocol
==
'http'
)
&&
!
(
$_SERVER
[
'SERVER_PORT'
]
==
'443'
&&
$protocol
==
'https'
)
)
{
$port
=
":
{
$_SERVER
[
'SERVER_PORT'
]
}
"
;
}
$menu_messages
=
''
;
echo
"
\n
document.location.href = '
{
$protocol
}
://
{
$_SERVER
[
'SERVER_NAME'
]
}{
$port
}
/
{
$text
}
';
\n
"
;
}
else
{
header
(
"Location:
$text
"
);
}
}
if
(
count
(
$notices
)
==
1
)
$msg
=
sprintf
(
"%1$02d"
,
count
(
$notices
))
.
" "
.
gettext
(
"unread notice"
);
else
$msg
=
sprintf
(
"%1$02d"
,
count
(
$notices
))
.
" "
.
gettext
(
"unread notices"
);
function
get_menu_messages
()
{
global
$config
;
$menu_messages
.=
"<a href=
\"
/
\"
class=
\"
dropdown-toggle
\"
data-toggle=
\"
dropdown
\"
role=
\"
button
\"
aria-expanded=
\"
false
\"
><span class=
\"
text-primary
\"
>
{
$msg
}
</span><span class=
\"
caret text-primary
\"
></span></a>
{
$notice_msgs
}
\n
"
;
if
(
are_notices_pending
())
{
$notices
=
get_notices
();
$requests
=
array
();
}
## Get Query Arguments from URL ###
foreach
(
$_REQUEST
as
$key
=>
$value
)
{
if
(
$key
!=
"PHPSESSID"
)
{
$requests
[]
=
$key
.
'='
.
$value
;
}
else
{
$menu_messages
=
''
;
$menu_messages
.=
"<a href=
\"
#
\"
>"
.
$config
[
'system'
][
'hostname'
]
.
"."
.
$config
[
'system'
][
'domain'
]
.
"</a>"
;
$menu_messages
.=
''
;
}
return
(
$menu_messages
);
}
}
if
(
!
function_exists
(
"dom_title"
))
{
function
dom_title
(
$title_msg
,
$width
=
NULL
){
$width
=
preg_replace
(
"/\D+/"
,
""
,
$width
);
if
(
!
empty
(
$width
)){
$width
=
",'width',
$width
"
;
if
(
is_array
(
$requests
))
{
$request_string
=
implode
(
"&"
,
$requests
);
}
if
(
is_array
(
$notices
))
{
$notice_msgs
=
"<ul class=
\"
dropdown-menu
\"
role=
\"
menu
\"
>"
;
$notice_msgs
.=
"<li><a href=
\"
#
\"
onclick=
\"
notice_action('acknowledge','all');
\"
>"
.
gettext
(
"Acknowledge All Notices"
)
.
"</a></li><li class=
\"
divider
\"
></li>"
;
foreach
(
$notices
as
$key
=>
$value
)
{
$date
=
date
(
"m-d-y H:i:s"
,
$key
);
$noticemsg
=
(
$value
[
'notice'
]
!=
""
?
$value
[
'notice'
]
:
$value
[
'id'
]);
$noticemsg
=
preg_replace
(
"/(
\"
|\'|
\n
|<.?\w+>)/i"
,
""
,
$noticemsg
);
if
((
strlen
(
$noticemsg
)
*
8
)
>
$domtt_width
)
{
$domtt_width
=
(
strlen
(
$noticemsg
)
*
8
);
}
if
((
strlen
(
$noticemsg
)
*
8
)
>
900
)
{
$domtt_width
=
900
;
}
$alert_action
=
"onclick=
\"
notice_action('acknowledge','
{
$key
}
'); jQuery(this).parent().parent().remove();
\"
"
;
$notice_msgs
.=
"<li><a href=
\"
#
\"
{
$alert_link
}
{
$alert_action
}
>
{
$date
}
[ "
.
htmlspecialchars
(
$noticemsg
)
.
"]</a></li>"
;
}
if
(
!
empty
(
$title_msg
)){
$title_msg
=
preg_replace
(
"/\s+/"
,
" "
,
$title_msg
);
$title_msg
=
preg_replace
(
"/'/"
,
"\'"
,
$title_msg
);
return
"onmouseout=
\"
this.style.color = ''; domTT_mouseout(this, event);
\"
onmouseover=
\"
domTT_activate(this, event, 'content', '
{
$title_msg
}
', 'trail', true, 'delay', 250, 'fade', 'both', 'fadeMax', 93, 'styleClass', 'niceTitle'
$width
);
\"
"
;
$notice_msgs
.=
"</ul>"
;
$menu_messages
=
''
;
if
(
count
(
$notices
)
==
1
)
{
$msg
=
sprintf
(
"%1$02d"
,
count
(
$notices
))
.
" "
.
gettext
(
"unread notice"
);
}
else
{
$msg
=
sprintf
(
"%1$02d"
,
count
(
$notices
))
.
" "
.
gettext
(
"unread notices"
);
}
$menu_messages
.=
"<a href=
\"
/
\"
class=
\"
dropdown-toggle
\"
data-toggle=
\"
dropdown
\"
role=
\"
button
\"
aria-expanded=
\"
false
\"
><span class=
\"
text-primary
\"
>
{
$msg
}
</span><span class=
\"
caret text-primary
\"
></span></a>
{
$notice_msgs
}
\n
"
;
}
}
else
{
$menu_messages
=
''
;
$menu_messages
.=
"<a href=
\"
#
\"
>"
.
$config
[
'system'
][
'hostname'
]
.
"."
.
$config
[
'system'
][
'domain'
]
.
"</a>"
;
$menu_messages
.=
''
;
}
return
(
$menu_messages
);
}
/* include all configuration functions */
require_once
(
"interfaces.inc"
);
require_once
(
"gwlb.inc"
);
...
...
src/www/firewall_aliases_import.php
View file @
4d336198
...
...
@@ -141,7 +141,7 @@ if($_POST['aliasimport'] <> "") {
if
(
write_config
())
mark_subsystem_dirty
(
'aliases'
);
pfSense
Header
(
"firewall_aliases.php"
);
redirect
Header
(
"firewall_aliases.php"
);
exit
;
}
...
...
src/www/pkg_edit.php
View file @
4d336198
...
...
@@ -50,7 +50,7 @@ function get_pkg_interfaces_select_source($include_localhost=false) {
}
/* dummy stubs needed by some code that was MFC'd */
function
pfSense
Header
(
$location
)
{
header
(
"Location: "
.
$location
);
}
function
redirect
Header
(
$location
)
{
header
(
"Location: "
.
$location
);
}
function
gentitle_pkg
(
$pgname
)
{
global
$pfSense_config
;
...
...
@@ -241,11 +241,11 @@ if ($_POST) {
exec
(
$pkg
[
'restart_command'
]
.
">/dev/null 2&>1"
);
if
(
$pkg
[
'aftersaveredirect'
]
<>
""
)
{
pfSense
Header
(
$pkg
[
'aftersaveredirect'
]);
redirect
Header
(
$pkg
[
'aftersaveredirect'
]);
}
elseif
(
!
$pkg
[
'adddeleteeditpagefields'
])
{
pfSense
Header
(
"pkg_edit.php?xml=
{
$xml
}
&id=0"
);
redirect
Header
(
"pkg_edit.php?xml=
{
$xml
}
&id=0"
);
}
elseif
(
!
$pkg
[
'preoutput'
])
{
pfSense
Header
(
"pkg.php?xml="
.
$xml
);
redirect
Header
(
"pkg.php?xml="
.
$xml
);
}
exit
;
}
else
{
...
...
src/www/services_unbound_acls.php
View file @
4d336198
...
...
@@ -46,7 +46,7 @@ if (isset($_POST['act']))
if
(
$act
==
"del"
)
{
if
(
!
$a_acls
[
$id
])
{
pfSense
Header
(
"services_unbound_acls.php"
);
redirect
Header
(
"services_unbound_acls.php"
);
exit
;
}
...
...
@@ -122,7 +122,7 @@ if ($_POST) {
mark_subsystem_dirty
(
"unbound"
);
write_config
();
pfSense
Header
(
"/services_unbound_acls.php"
);
redirect
Header
(
"/services_unbound_acls.php"
);
exit
;
}
...
...
src/www/system_advanced_notifications.php
View file @
4d336198
...
...
@@ -127,7 +127,7 @@ if ($_POST) {
unset
(
$config
[
'system'
][
'disablebeep'
]);
write_config
();
pfSense
Header
(
"system_advanced_notifications.php"
);
redirect
Header
(
"system_advanced_notifications.php"
);
return
;
}
...
...
src/www/system_advanced_sysctl.php
View file @
4d336198
...
...
@@ -65,7 +65,7 @@ if ($act == "del") {
unset
(
$a_tunable
[
$id
]);
write_config
();
mark_subsystem_dirty
(
'sysctl'
);
pfSense
Header
(
"system_advanced_sysctl.php"
);
redirect
Header
(
"system_advanced_sysctl.php"
);
exit
;
}
}
...
...
@@ -105,7 +105,7 @@ if ($_POST) {
write_config
();
pfSense
Header
(
"system_advanced_sysctl.php"
);
redirect
Header
(
"system_advanced_sysctl.php"
);
exit
;
}
}
...
...
src/www/system_authservers.php
View file @
4d336198
...
...
@@ -56,7 +56,7 @@ if ($_POST['act'])
if
(
$act
==
"del"
)
{
if
(
!
$a_server
[
$_GET
[
'id'
]])
{
pfSense
Header
(
"system_authservers.php"
);
redirect
Header
(
"system_authservers.php"
);
exit
;
}
...
...
@@ -293,7 +293,7 @@ if ($_POST) {
write_config
();
pfSense
Header
(
"system_authservers.php"
);
redirect
Header
(
"system_authservers.php"
);
}
}
...
...
src/www/system_camanager.php
View file @
4d336198
...
...
@@ -67,7 +67,7 @@ if ($_POST['act'])
if
(
$act
==
"del"
)
{
if
(
!
isset
(
$a_ca
[
$id
]))
{
pfSense
Header
(
"system_camanager.php"
);
redirect
Header
(
"system_camanager.php"
);
exit
;
}
...
...
@@ -85,13 +85,13 @@ if ($act == "del") {
unset
(
$a_ca
[
$id
]);
write_config
();
$savemsg
=
sprintf
(
gettext
(
"Certificate Authority %s and its CRLs (if any) successfully deleted"
),
$name
)
.
"<br />"
;
pfSense
Header
(
"system_camanager.php"
);
redirect
Header
(
"system_camanager.php"
);
exit
;
}
if
(
$act
==
"edit"
)
{
if
(
!
$a_ca
[
$id
])
{
pfSense
Header
(
"system_camanager.php"
);
redirect
Header
(
"system_camanager.php"
);
exit
;
}
$pconfig
[
'descr'
]
=
$a_ca
[
$id
][
'descr'
];
...
...
@@ -113,7 +113,7 @@ if ($act == "new") {
if
(
$act
==
"exp"
)
{
if
(
!
$a_ca
[
$id
])
{
pfSense
Header
(
"system_camanager.php"
);
redirect
Header
(
"system_camanager.php"
);
exit
;
}
...
...
@@ -131,7 +131,7 @@ if ($act == "exp") {
if
(
$act
==
"expkey"
)
{
if
(
!
$a_ca
[
$id
])
{
pfSense
Header
(
"system_camanager.php"
);
redirect
Header
(
"system_camanager.php"
);
exit
;
}
...
...
@@ -287,7 +287,7 @@ if ($_POST) {
if (!
$input_errors
)
write_config();
//
pfSense
Header("
system_camanager
.
php
");
//
redirect
Header("
system_camanager
.
php
");
}
}
...
...
src/www/system_certmanager.php
View file @
4d336198
...
...
@@ -82,7 +82,7 @@ if ($_POST['act'])
if
(
$act
==
"del"
)
{
if
(
!
isset
(
$a_cert
[
$id
]))
{
pfSense
Header
(
"system_certmanager.php"
);
redirect
Header
(
"system_certmanager.php"
);
exit
;
}
...
...
@@ -90,7 +90,7 @@ if ($act == "del") {
unset
(
$a_cert
[
$id
]);
write_config
();
$savemsg
=
sprintf
(
gettext
(
"Certificate %s successfully deleted"
),
$name
)
.
"<br />"
;
pfSense
Header
(
"system_certmanager.php"
);
redirect
Header
(
"system_certmanager.php"
);
exit
;
}
...
...
@@ -106,7 +106,7 @@ if ($act == "new") {
if
(
$act
==
"exp"
)
{
if
(
!
$a_cert
[
$id
])
{
pfSense
Header
(
"system_certmanager.php"
);
redirect
Header
(
"system_certmanager.php"
);
exit
;
}
...
...
@@ -124,7 +124,7 @@ if ($act == "exp") {
if
(
$act
==
"key"
)
{
if
(
!
$a_cert
[
$id
])
{
pfSense
Header
(
"system_certmanager.php"
);
redirect
Header
(
"system_certmanager.php"
);
exit
;
}
...
...
@@ -141,7 +141,7 @@ if ($act == "key") {
if
(
$act
==
"p12"
)
{
if
(
!
$a_cert
[
$id
])
{
pfSense
Header
(
"system_certmanager.php"
);
redirect
Header
(
"system_certmanager.php"
);
exit
;
}
...
...
@@ -170,7 +170,7 @@ if ($act == "p12") {
if
(
$act
==
"csr"
)
{
if
(
!
$a_cert
[
$id
])
{
pfSense
Header
(
"system_certmanager.php"
);
redirect
Header
(
"system_certmanager.php"
);
exit
;
}
...
...
@@ -445,7 +445,7 @@ if ($_POST) {
write_config
();
pfSense
Header
(
"system_certmanager.php"
);
redirect
Header
(
"system_certmanager.php"
);
}
}
}
...
...
src/www/system_crlmanager.php
View file @
4d336198
...
...
@@ -71,7 +71,7 @@ if (!empty($id))
// If we were given an invalid crlref in the id, no sense in continuing as it would only cause errors.
if
(
!
$thiscrl
&&
((
$act
!=
""
)
&&
(
$act
!=
"new"
)))
{
pfSense
Header
(
"system_crlmanager.php"
);
redirect
Header
(
"system_crlmanager.php"
);
$act
=
""
;
$savemsg
=
gettext
(
"Invalid CRL reference."
);
}
...
...
@@ -115,7 +115,7 @@ if ($act == "addcert") {
$pconfig
=
$_POST
;
if
(
!
$pconfig
[
'crlref'
]
||
!
$pconfig
[
'certref'
])
{
pfSense
Header
(
"system_crlmanager.php"
);
redirect
Header
(
"system_crlmanager.php"
);
exit
;
}
...
...
@@ -139,7 +139,7 @@ if ($act == "addcert") {
cert_revoke
(
$cert
,
$crl
,
$reason
);
openvpn_refresh_crls
();
write_config
(
"Revoked cert
{
$cert
[
'descr'
]
}
in CRL
{
$crl
[
'descr'
]
}
."
);
pfSense
Header
(
"system_crlmanager.php"
);
redirect
Header
(
"system_crlmanager.php"
);
exit
;
}
}
...
...
@@ -147,7 +147,7 @@ if ($act == "addcert") {
if
(
$act
==
"delcert"
)
{
if
(
!
is_array
(
$thiscrl
[
'cert'
]))
{
pfSense
Header
(
"system_crlmanager.php"
);
redirect
Header
(
"system_crlmanager.php"
);
exit
;
}
$found
=
false
;
...
...
@@ -158,7 +158,7 @@ if ($act == "delcert") {
}
}
if
(
!
$found
)
{
pfSense
Header
(
"system_crlmanager.php"
);
redirect
Header
(
"system_crlmanager.php"
);
exit
;
}
$name
=
$thiscert
[
'descr'
];
...
...
@@ -231,7 +231,7 @@ if ($_POST) {
write_config
(
"Saved CRL
{
$crl
[
'descr'
]
}
"
);
openvpn_refresh_crls
();
pfSense
Header
(
"system_crlmanager.php"
);
redirect
Header
(
"system_crlmanager.php"
);
}
}
...
...
src/www/system_groupmanager.php
View file @
4d336198
...
...
@@ -46,7 +46,7 @@ $act = (isset($_POST['act']) ? $_POST['act'] : '');
if
(
$act
==
"delgroup"
)
{
if
(
!
isset
(
$id
)
||
!
isset
(
$_POST
[
'groupname'
])
||
!
isset
(
$a_group
[
$id
])
||
(
$_POST
[
'groupname'
]
!=
$a_group
[
$id
][
'name'
]))
{
pfSense
Header
(
"system_groupmanager.php"
);
redirect
Header
(
"system_groupmanager.php"
);
exit
;
}
...
...
@@ -61,7 +61,7 @@ if ($act == "delgroup") {
if
(
$act
==
"delpriv"
)
{
if
(
!
isset
(
$id
)
||
!
isset
(
$a_group
[
$id
]))
{
pfSense
Header
(
"system_groupmanager.php"
);
redirect
Header
(
"system_groupmanager.php"
);
exit
;
}
...
...
src/www/system_groupmanager_addprivs.php
View file @
4d336198
...
...
@@ -51,7 +51,7 @@ if (isset($_POST['groupid']) && is_numericint($_POST['groupid']))
$a_group
=
&
$config
[
'system'
][
'group'
][
$groupid
];
if
(
!
is_array
(
$a_group
))
{
pfSense
Header
(
"system_groupmanager.php?id=
{
$groupid
}
"
);
redirect
Header
(
"system_groupmanager.php?id=
{
$groupid
}
"
);
exit
;
}
...
...
@@ -98,7 +98,7 @@ if ($_POST) {
$retval
=
write_config
();
$savemsg
=
get_std_save_message
(
$retval
);
pfSense
Header
(
"system_groupmanager.php?act=edit&id=
{
$groupid
}
"
);
redirect
Header
(
"system_groupmanager.php?act=edit&id=
{
$groupid
}
"
);
exit
;
}
}
...
...
src/www/system_usermanager.php
View file @
4d336198
...
...
@@ -65,7 +65,7 @@ if (isset($id) && $a_user[$id]) {
if
(
$_POST
[
'act'
]
==
"deluser"
)
{
if
(
!
isset
(
$_POST
[
'username'
])
||
!
isset
(
$a_user
[
$id
])
||
(
$_POST
[
'username'
]
!=
$a_user
[
$id
][
'name'
]))
{
pfSense
Header
(
"system_usermanager.php"
);
redirect
Header
(
"system_usermanager.php"
);
exit
;
}
...
...
@@ -79,7 +79,7 @@ if ($_POST['act'] == "deluser") {
else
if
(
$_POST
[
'act'
]
==
"delpriv"
)
{
if
(
!
$a_user
[
$id
])
{
pfSense
Header
(
"system_usermanager.php"
);
redirect
Header
(
"system_usermanager.php"
);
exit
;
}
...
...
@@ -94,7 +94,7 @@ else if ($_POST['act'] == "delpriv") {
else
if
(
$_POST
[
'act'
]
==
"expcert"
)
{
if
(
!
$a_user
[
$id
])
{
pfSense
Header
(
"system_usermanager.php"
);
redirect
Header
(
"system_usermanager.php"
);
exit
;
}
...
...
@@ -113,7 +113,7 @@ else if ($_POST['act'] == "expcert") {
else
if
(
$_POST
[
'act'
]
==
"expckey"
)
{
if
(
!
$a_user
[
$id
])
{
pfSense
Header
(
"system_usermanager.php"
);
redirect
Header
(
"system_usermanager.php"
);
exit
;
}
...
...
@@ -132,7 +132,7 @@ else if ($_POST['act'] == "expckey") {
else
if
(
$_POST
[
'act'
]
==
"delcert"
)
{
if
(
!
$a_user
[
$id
])
{
pfSense
Header
(
"system_usermanager.php"
);
redirect
Header
(
"system_usermanager.php"
);
exit
;
}
...
...
@@ -322,7 +322,7 @@ if ($_POST['save']) {
local_user_set
(
$userent
);
write_config
();
pfSense
Header
(
"system_usermanager.php"
);
redirect
Header
(
"system_usermanager.php"
);
}
}
...
...
src/www/system_usermanager_addprivs.php
View file @
4d336198
...
...
@@ -40,7 +40,7 @@ if (isset($_POST['userid']) && is_numericint($_POST['userid']))
$userid
=
$_POST
[
'userid'
];
if
(
!
isset
(
$config
[
'system'
][
'user'
][
$userid
])
&&
!
is_array
(
$config
[
'system'
][
'user'
][
$userid
]))
{
pfSense
Header
(
"system_usermanager.php"
);
redirect
Header
(
"system_usermanager.php"
);
exit
;
}
...
...
src/www/vpn_l2tp_users.php
View file @
4d336198
...
...
@@ -59,7 +59,7 @@ if ($_GET['act'] == "del") {
unset
(
$a_secret
[
$_GET
[
'id'
]]);
write_config
();
mark_subsystem_dirty
(
'l2tpusers'
);
pfSense
Header
(
"vpn_l2tp_users.php"
);
redirect
Header
(
"vpn_l2tp_users.php"
);
exit
;
}
}
...
...
src/www/vpn_l2tp_users_edit.php
View file @
4d336198
...
...
@@ -128,7 +128,7 @@ if ($_POST) {
$retval
=
vpn_l2tp_configure
();
pfSense
Header
(
"vpn_l2tp_users.php"
);
redirect
Header
(
"vpn_l2tp_users.php"
);
exit
;
}
...
...
src/www/vpn_openvpn_client.php
View file @
4d336198
...
...
@@ -69,7 +69,7 @@ else
if
(
$_GET
[
'act'
]
==
"del"
)
{
if
(
!
isset
(
$a_client
[
$id
]))
{
pfSense
Header
(
"vpn_openvpn_client.php"
);
redirect
Header
(
"vpn_openvpn_client.php"
);
exit
;
}
if
(
!
empty
(
$a_client
[
$id
]))
...
...
src/www/vpn_openvpn_csc.php
View file @
4d336198
...
...
@@ -49,7 +49,7 @@ if (isset($_POST['act']))
if
(
$_GET
[
'act'
]
==
"del"
)
{
if
(
!
$a_csc
[
$id
])
{
pfSense
Header
(
"vpn_openvpn_csc.php"
);
redirect
Header
(
"vpn_openvpn_csc.php"
);
exit
;
}
...
...
src/www/vpn_openvpn_export.php
View file @
4d336198
...
...
@@ -120,11 +120,11 @@ if (!empty($act)) {
$usrid
=
$_GET
[
'usrid'
];
$crtid
=
$_GET
[
'crtid'
];
if
(
$srvid
===
false
)
{
pfSense
Header
(
"vpn_openvpn_export.php"
);
redirect
Header
(
"vpn_openvpn_export.php"
);
exit
;
}
else
if
((
$config
[
'openvpn'
][
'openvpn-server'
][
$srvid
][
'mode'
]
!=
"server_user"
)
&&
((
$usrid
===
false
)
||
(
$crtid
===
false
)))
{
pfSense
Header
(
"vpn_openvpn_export.php"
);
redirect
Header
(
"vpn_openvpn_export.php"
);
exit
;
}
...
...
src/www/vpn_openvpn_export_shared.php
View file @
4d336198
...
...
@@ -75,7 +75,7 @@ $error = false;
if
((
$act
==
"skconf"
)
||
(
$act
==
"skzipconf"
))
{
$srvid
=
$_GET
[
'srvid'
];
if
((
$srvid
===
false
)
||
(
$config
[
'openvpn'
][
'openvpn-server'
][
$srvid
][
'mode'
]
!=
"p2p_shared_key"
))
{
pfSense
Header
(
"vpn_openvpn_export.php"
);
redirect
Header
(
"vpn_openvpn_export.php"
);
exit
;
}
...
...
src/www/vpn_openvpn_server.php
View file @
4d336198
...
...
@@ -70,7 +70,7 @@ else
if
(
$_GET
[
'act'
]
==
"del"
)
{
if
(
!
isset
(
$a_server
[
$id
]))
{
pfSense
Header
(
"vpn_openvpn_server.php"
);
redirect
Header
(
"vpn_openvpn_server.php"
);
exit
;
}
if
(
!
empty
(
$a_server
[
$id
]))
...
...
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