snipe / snipe-it

A free open source IT asset/license management system
https://snipeitapp.com
GNU Affero General Public License v3.0
11.21k stars 3.2k forks source link

Activity report asks for login when using Remote User Header #9165

Closed kno005 closed 2 years ago

kno005 commented 3 years ago

Please confirm you have done the following before posting your bug report:

Describe the bug

After enabling "Enable Login with Remote User Header" when clicking on Reports -> Activity Report I get a browser login window. Entering either a valid or invalid login does nothing. Behind the login box the Activity Report is shown with data but when clicking cancel on the login dialog box the data in the report table vanishes to be replaced with "No matching records found." When clicking another page number the data appears and you can go back to page 1. No entries in laravel.log are generated

To Reproduce Steps to reproduce the behavior:

  1. Enable login with Remote User Header
  2. From the left menu select Reports -> Activity Report
  3. Login box appears
  4. No logins accepted
  5. Clicking cancel closes the login box and the data in the report vanishes.

Expected behavior A login box should no appear and the Activity Report should load properly.

Screenshots Login box: image

Activity Report after clicking cancel: image

Server (please complete the following information):

Desktop (please complete the following information):

Smartphone (please complete the following information): Didn't test

Error Messages

0 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Auth\Middleware\Authenticate.php(67): Illuminate\Auth\Middleware\Authenticate->unauthenticated()

1 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Auth\Middleware\Authenticate.php(41): Illuminate\Auth\Middleware\Authenticate->authenticate()

2 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): Illuminate\Auth\Middleware\Authenticate->handle()

3 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(105): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()

4 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Routing\Router.php(683): Illuminate\Pipeline\Pipeline->then()

5 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Routing\Router.php(658): Illuminate\Routing\Router->runRouteWithinStack()

6 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Routing\Router.php(624): Illuminate\Routing\Router->runRoute()

7 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Routing\Router.php(613): Illuminate\Routing\Router->dispatchToRoute()

8 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(170): Illuminate\Routing\Router->dispatch()

9 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(130): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http{closure}()

10 C:\inetpub\wwwroot\snipe-it\vendor\barryvdh\laravel-debugbar\src\Middleware\InjectDebugbar.php(67): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()

11 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): Barryvdh\Debugbar\Middleware\InjectDebugbar->handle()

12 C:\inetpub\wwwroot\snipe-it\app\Http\Middleware\SecurityHeaders.php(26): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()

13 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): App\Http\Middleware\SecurityHeaders->handle()

14 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()

15 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle()

16 C:\inetpub\wwwroot\snipe-it\app\Http\Middleware\CheckForDebug.php(25): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()

17 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): App\Http\Middleware\CheckForDebug->handle()

18 C:\inetpub\wwwroot\snipe-it\app\Http\Middleware\CheckForSetup.php(26): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()

19 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): App\Http\Middleware\CheckForSetup->handle()

20 C:\inetpub\wwwroot\snipe-it\vendor\fideloper\proxy\src\TrustProxies.php(57): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()

21 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): Fideloper\Proxy\TrustProxies->handle()

22 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\View\Middleware\ShareErrorsFromSession.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()

23 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): Illuminate\View\Middleware\ShareErrorsFromSession->handle()

24 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Session\Middleware\StartSession.php(56): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()

25 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): Illuminate\Session\Middleware\StartSession->handle()

26 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode.php(63): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()

27 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle()

28 C:\inetpub\wwwroot\snipe-it\app\Http\Middleware\NoSessionStore.php(27): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()

29 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): App\Http\Middleware\NoSessionStore->handle()

30 C:\inetpub\wwwroot\snipe-it\vendor\barryvdh\laravel-cors\src\HandlePreflight.php(29): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()

31 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): Barryvdh\Cors\HandlePreflight->handle()

32 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(105): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()

33 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(145): Illuminate\Pipeline\Pipeline->then()

34 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(110): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter()

35 C:\inetpub\wwwroot\snipe-it\public\index.php(58): Illuminate\Foundation\Http\Kernel->handle()

36 {main}

- If a stacktrace is provided in the error, include that too.
- Any errors that appear in your browser's error console.
![image](https://user-images.githubusercontent.com/44898477/108517785-d722ae80-7295-11eb-9390-fd0b34d9e5e4.png)

- Confirm whether the error is reproducible on the demo: https://snipeitapp.com/demo.
No, different login method
- Include any additional information you can find in `storage/logs` and your webserver's logs.
No logs generated
- Include the output from `php -m` (this should display what modules you have enabled.)

[PHP Modules] bcmath calendar Core ctype curl date dom exif fileinfo filter gd gettext hash iconv imap json ldap libxml mbstring mysqli mysqlnd openssl pcre PDO pdo_mysql PDO_ODBC pdo_pgsql pdo_sqlite Phar readline Reflection session SimpleXML soap SPL sqlite3 standard tidy tokenizer wincache xml xmlreader xmlrpc xmlwriter zip zlib

[Zend Modules]


**Additional context**
- Is this a fresh install or an upgrade? 
Upgrade
- What OS and web server you're running Snipe-IT on 
Server 2016/IIS
- What method you used to install Snipe-IT (install.sh, manual installation, docker, etc)
Git
- Include what you've done so far in the installation, and if you got any error messages along the way.
Nothing out of the ordinary, we have been using Snipe for a while now.
- Indicate whether or not you've manually edited any data directly in the database
No

Add any other context about the problem here.

Please do not post an issue without answering the related questions above. If you have opened a different issue and already answered these questions, answer them again, once for every ticket. It will be next to impossible for us to help you.
welcome[bot] commented 3 years ago

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

kno005 commented 2 years ago

This issue is still present. Anyone have any thoughts?

snipe commented 2 years ago

I have never been able to reproduce this - are you still seeing it in v6?

kno005 commented 2 years ago

Fortunately the issue is no longer happening. I'm not sure when it got resolved but I'll take it.

snipe commented 2 years ago

Excellent, glad to hear it :)

userbradley commented 1 month ago

Sorry, I know this is years old, but how do you enable Remote User Header? I cant find it in the Documentation

snipe commented 1 month ago

In /admin/security

Screenshot 2024-10-09 at 4 10 23 PM
userbradley commented 1 month ago

Ah! Magnificent, thank you @snipe <3 - is there an option to set it in the config file instead? I'm running my instance in k8s so the less that's done in the UI the better