Fix coding covention and add security to the variable $_SERVER

1.10.x
nosolored 9 years ago
parent ebf574fd02
commit 01b43f5512
  1. 2
      main/auth/inscription.php
  2. 2
      plugin/buycourses/src/process.php

@ -719,7 +719,7 @@ if ($form->validate()) {
}
}
if(!empty($_SESSION['urlReturn'])){
if (!empty($_SESSION['urlReturn'])) {
$form_data['action'] = api_get_path(WEB_PATH).$_SESSION['urlReturn'];
Session::erase('urlReturn');
}

@ -13,7 +13,7 @@ use ChamiloSession as Session;
$currentUserId = api_get_user_id();
if (empty($currentUserId)) {
Session::write('urlReturn', $_SERVER['REQUEST_URI']);
Session::write('urlReturn', Security :: remove_XSS($_SERVER['REQUEST_URI']));
header('Location: ' . api_get_path(WEB_CODE_PATH) . 'auth/inscription.php');
exit;
}

Loading…
Cancel
Save