Addresses security flaw allowing unauthenticated access to server overview.
This commit is contained in:
parent
02458c909d
commit
0d61417814
|
@ -113,7 +113,9 @@ class Server extends Model
|
|||
*/
|
||||
public static function byUuid($uuid)
|
||||
{
|
||||
$query = self::with('service', 'node')->where('uuidShort', $uuid)->orWhere('uuid', $uuid);
|
||||
$query = self::with('service', 'node')->where(function ($q) use ($uuid) {
|
||||
$q->where('uuidShort', $uuid)->orWhere('uuid', $uuid);
|
||||
});
|
||||
|
||||
if (! Auth::user()->isRootAdmin()) {
|
||||
$query->whereIn('id', Auth::user()->serverAccessArray());
|
||||
|
|
Loading…
Reference in New Issue