netfishers-onl / Netshot

Network Configuration and Compliance Management
http://www.netfishers.onl/netshot
249 stars 60 forks source link

Errror 500 on /api/user using API Token #317

Closed M0NsTeRRR closed 2 months ago

M0NsTeRRR commented 2 months ago

Token is created with full admin access image

Using Swagger with an authenticated user

curl -X 'GET' \
  'https://netshot.example.com/api/user' \
  -H 'accept: application/json'

return

{
  "id": 0,
  "local": false,
  "username": "ludovic.ortega",
  "level": 1000
}

Using swagger with ApiTokenAuth

curl -X 'GET' \
  'https://netshot.example.com/api/user' \
  -H 'accept: application/json' \
  -H 'X-Netshot-API-Token: xxxxxxxx'

return HTTP error 500

SCadilhac commented 2 months ago

Fixed by 84fc64c613471f1c0f5c9691722b343f6f321da3 Thanks for reporting!