Skip to content

Commit da25e47

Browse files
committed
fix: Unauthenticated privilege escalation
1 parent aee46c4 commit da25e47

2 files changed

Lines changed: 2 additions & 7 deletions

File tree

modules/utenti/actions.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
* along with this program. If not, see <https://www.gnu.org/licenses/>.
1919
*/
2020

21-
$skip_permissions = true;
2221
include_once __DIR__.'/../../core.php';
2322

2423
use Models\Group;

modules/utenti/info.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,8 @@
2121
use Models\Module;
2222
use Models\Setting;
2323

24-
$skip_permissions = true;
2524
include_once __DIR__.'/../../core.php';
2625

27-
if (!AuthOSM::check()) {
28-
redirect_url(base_path_osm().'/index.php');
29-
}
30-
3126
$pageTitle = tr('Utente');
3227

3328
include_once App::filepath('include|custom|', 'top.php');
@@ -49,6 +44,7 @@
4944

5045
$api = base_url().'/api/?token='.$token;
5146
$module = Module::where('name', 'Utenti e permessi')->first();
47+
$first_module = AuthOSM::firstModule();
5248

5349
echo '
5450
<div class="row">
@@ -213,7 +209,7 @@ function salvaImpostazione(id, valore){
213209
dataType: "JSON",
214210
data: {
215211
op: "update_setting",
216-
id_module: '.$module->id.',
212+
id_module: '.$first_module.',
217213
id: id,
218214
valore: valore,
219215
},

0 commit comments

Comments
 (0)