mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fix XSS in api access (#14551)
api access page didn't escape username allowing for injection.
This commit is contained in:
@@ -59,7 +59,7 @@ if (Auth::user()->hasGlobalAdmin()) {
|
||||
<select class="form-control" id="user_id" name="user_id">
|
||||
<?php
|
||||
foreach ($userlist = User::all() as $user) {
|
||||
echo '<option value="' . $user->user_id . '">' . $user->username . ' (' . $user->auth_type . ')</option>';
|
||||
echo '<option value="' . $user->user_id . '">' . htmlentities($user->username) . ' (' . htmlentities($user->auth_type) . ')</option>';
|
||||
} ?>
|
||||
</select>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user