Skip to content

Commit aaf9754

Browse files
committed
Security: Remove unused 'page' parameter from session user forms.
See advisory GHSA-h3m8-53j3-xjx8
1 parent e3a3788 commit aaf9754

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

main/session/add_users_to_session.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@
3838
$add_type = Security::remove_XSS($_REQUEST['add_type']);
3939
}
4040

41-
$page = isset($_GET['page']) ? Security::remove_XSS($_GET['page']) : null;
42-
4341
// Checking for extra field with filter on
4442
$extra_field_list = UserManager::get_extra_fields();
4543

@@ -701,7 +699,7 @@ function loadAllUsers() {
701699
?>
702700
</div>
703701
<form name="formulaire" method="post"
704-
action="<?php echo api_get_self(); ?>?page=<?php echo $page; ?>&id_session=<?php echo $id_session; ?><?php if (!empty($addProcess)) {
702+
action="<?php echo api_get_self(); ?>?id_session=<?php echo $id_session; ?><?php if (!empty($addProcess)) {
705703
echo '&add=true';
706704
} ?>" <?php if ($ajax_search) {
707705
echo ' onsubmit="valide();"';

main/user/add_users_to_session.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@
5151
$add_type = Security::remove_XSS($_REQUEST['add_type']);
5252
}
5353

54-
$page = isset($_GET['page']) ? Security::remove_XSS($_GET['page']) : null;
55-
5654
// Checking for extra field with filter on
5755
$extra_field_list = UserManager::get_extra_fields();
5856
$new_field_list = [];
@@ -480,7 +478,7 @@ function change_select(val) {
480478
<?php echo $link_add_type_unique; ?>&nbsp;|&nbsp;<?php echo $link_add_type_multiple; ?>&nbsp;|&nbsp;<?php echo $link_add_group; ?>
481479
</div>
482480
<form name="formulaire" method="post"
483-
action="<?php echo api_get_self(); ?>?page=<?php echo $page; ?>&id_session=<?php echo $id_session; ?><?php if (!empty($_GET['add'])) {
481+
action="<?php echo api_get_self(); ?>?id_session=<?php echo $id_session; ?><?php if (!empty($_GET['add'])) {
484482
echo '&add=true';
485483
} ?>" style="margin:0px;" <?php if ($ajax_search) {
486484
echo ' onsubmit="valide();"';

0 commit comments

Comments
 (0)