Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Authentication Password / MD5 Hash Fault #129

Closed
1 task done
crodriguez6497 opened this issue Dec 14, 2023 · 2 comments
Closed
1 task done

[BUG] Authentication Password / MD5 Hash Fault #129

crodriguez6497 opened this issue Dec 14, 2023 · 2 comments

Comments

@crodriguez6497
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When entering a password consisting only of numbers for either form or basic authentication, bazarr will throw a 500 ERROR and subsequently set authentication type to null and does not set a username or password in the config. This can only be rectified by manually inputting the MD5 hash (password), username, and authentication type in the config.yml.

auth:
apikey: REDACTED
password: ''
type: null
username: ''

Without digging too much into it, I am assuming it expects a string value type and is misinterpreting a numeric input as a different value type leading to errors with hash generation.

Expected Behavior

Bazarr accepts passwords for authentication that consist only of numbers.

Steps To Reproduce

  1. Settings>General>Authentication
  2. Select either Basic or Form
  3. Enter a username + Password(only numbers)
  4. Save

Environment

UNRAID Version: 6.12.6
-Docker-compose

I have also tested this using Windows 11 23H2 using Docker Desktop wsl2 default and encountered the same issue.

CPU architecture

x86-64

Docker creation

bazarr:
    image: lscr.io/linuxserver/bazarr:latest
    container_name: bazarr
    environment:
      - PUID=99
      - PGID=100
      - TZ=Etc/UTC
    ports:
      - "6767:6767tcp"
    volumes:
      - /mnt/user/appdata/bazarr:/config
      - /mnt/user/data/media:/data/media
    restart: unless-stopped
    networks:
      - media-network

Container logs

2023-12-14 14:41:21,395 - app.app (14815e767b38) :  ERROR (app:1741) - Exception on /api/system/settings [POST]

----------------

14/12/2023 14:44:01|ERROR   |app.app                         |Exception on /api/system/settings [POST]|'Traceback (most recent call last):\n  File "/app/bazarr/bin/bazarr/../libs/flask/app.py", line 1820, in full_dispatch_request\n    rv = self.dispatch_request()\n         ^^^^^^^^^^^^^^^^^^^^^^^\n  File "/app/bazarr/bin/bazarr/../libs/flask/app.py", line 1796, in dispatch_request\n    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File "/app/bazarr/bin/bazarr/../libs/flask_restx/api.py", line 405, in wrapper\n    resp = resource(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^\n  File "/app/bazarr/bin/bazarr/../libs/flask/views.py", line 107, in view\n    return current_app.ensure_sync(self.dispatch_request)(**kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File "/app/bazarr/bin/bazarr/../libs/flask_restx/resource.py", line 46, in dispatch_request\n    resp = meth(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^\n  File "/app/bazarr/bin/bazarr/api/utils.py", line 30, in wrapper\n    return actual_method(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File "/app/bazarr/bin/bazarr/api/system/settings.py", line 120, in post\n    save_settings(zip(request.form.keys(), request.form.listvalues()))\n  File "/app/bazarr/bin/bazarr/app/config.py", line 522, in save_settings\n    value = hashlib.md5(value.encode(\'utf-8\')).hexdigest()\n                        ^^^^^^^^^^^^\nAttributeError: \'int\' object has no attribute \'encode\''|
Copy link

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

@aptalca
Copy link
Member

aptalca commented Dec 14, 2023

Not a container issue. Please report upstream

@aptalca aptalca closed this as not planned Won't fix, can't repro, duplicate, stale Dec 14, 2023
@LinuxServer-CI LinuxServer-CI moved this from Issues to Done in Issue & PR Tracker Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants