DisableAuth can't be set to True via api #2610

Closed
opened 2026-02-28 03:00:46 -05:00 by deekerman · 2 comments
Owner

Originally created by @DatGizmo on GitHub (Sep 20, 2023).

⚠️ Please verify that this bug has NOT been raised before.

  • I checked and didn't find similar issue

🛡️ Security Policy

Description

I tried to disable the auth via the ansible plugin, where it did not work.
Then I checked if the error is within the uptime python api.
But looking at the error It seems that the api endpoint is where the error happens.

Note:
When running the method with 'disableAuth = False' after manually disabling it, the code works fine.

👟 Reproduction steps

#!/bin/env python3

from uptime_kuma_api import UptimeKumaApi

api = UptimeKumaApi('http://localhost:3001')
api.login('admin', 'admin1')

api.set_settings(disableAuth=True)

api.disconnect()

👀 Expected behavior

Authenticiton is disabled

😓 Actual Behavior

Traceback (most recent call last):
  File "/home/sewe/git/scripts/./uptime-api", line 8, in <module>
    api.set_settings(checkUpdate=False, disableAuth=True)
  File "/home/sewe/.local/lib/python3.10/site-packages/uptime_kuma_api/api.py", line 2819, in set_settings
    return self._call('setSettings', (data, password))
  File "/home/sewe/.local/lib/python3.10/site-packages/uptime_kuma_api/api.py", line 550, in _call
    raise UptimeKumaException(r.get("msg"))
uptime_kuma_api.exceptions.UptimeKumaException: Wrong data type?

🐻 Uptime-Kuma Version

1.23.1

💻 Operating System and Arch

Ubuntu 22.04.03 LTS

🌐 Browser

qutebrowser v3.0.0

🐋 Docker Version

louislam/uptime-kuma:1.23.1-alpine

🟩 NodeJS Version

No response

📝 Relevant log output

No response

Originally created by @DatGizmo on GitHub (Sep 20, 2023). ### ⚠️ Please verify that this bug has NOT been raised before. - [X] I checked and didn't find similar issue ### 🛡️ Security Policy - [X] I agree to have read this project [Security Policy](https://github.com/louislam/uptime-kuma/security/policy) ### Description I tried to disable the auth via the ansible plugin, where it did not work. Then I checked if the error is within the uptime python api. But looking at the error It seems that the api endpoint is where the error happens. Note: When running the method with 'disableAuth = False' after manually disabling it, the code works fine. ### 👟 Reproduction steps ``` python3 #!/bin/env python3 from uptime_kuma_api import UptimeKumaApi api = UptimeKumaApi('http://localhost:3001') api.login('admin', 'admin1') api.set_settings(disableAuth=True) api.disconnect() ``` ### 👀 Expected behavior Authenticiton is disabled ### 😓 Actual Behavior ``` text Traceback (most recent call last): File "/home/sewe/git/scripts/./uptime-api", line 8, in <module> api.set_settings(checkUpdate=False, disableAuth=True) File "/home/sewe/.local/lib/python3.10/site-packages/uptime_kuma_api/api.py", line 2819, in set_settings return self._call('setSettings', (data, password)) File "/home/sewe/.local/lib/python3.10/site-packages/uptime_kuma_api/api.py", line 550, in _call raise UptimeKumaException(r.get("msg")) uptime_kuma_api.exceptions.UptimeKumaException: Wrong data type? ``` ### 🐻 Uptime-Kuma Version 1.23.1 ### 💻 Operating System and Arch Ubuntu 22.04.03 LTS ### 🌐 Browser qutebrowser v3.0.0 ### 🐋 Docker Version louislam/uptime-kuma:1.23.1-alpine ### 🟩 NodeJS Version _No response_ ### 📝 Relevant log output _No response_
deekerman 2026-02-28 03:00:46 -05:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@CommanderStorm commented on GitHub (Sep 20, 2023):

The API you are referencing requires the password to be present.

See

Could you re-check if his is the cause?

Please raise a documentation change PR or issue in https://github.com/lucasheld/uptime-kuma-api
This is an external tool, not managed by us.
See #118 for further details

This is the code where we set the setting:
github.com/louislam/uptime-kuma@38bcab67f9/src/components/settings/Security.vue (L188)

@CommanderStorm commented on GitHub (Sep 20, 2023): The API you are referencing requires the password to be present. See - https://github.com/lucasheld/uptime-kuma-api/blob/master/CHANGELOG.md#release-030 - https://github.com/lucasheld/uptime-kuma-api/blob/master/tests/test_login.py Could you re-check if his is the cause? Please raise a documentation change PR or issue in https://github.com/lucasheld/uptime-kuma-api This is an external tool, not managed by us. See #118 for further details This is the code where we set the setting: https://github.com/louislam/uptime-kuma/blob/38bcab67f9ad9689eb5b28c64ff80570b0db4e24/src/components/settings/Security.vue#L188
Author
Owner

@DatGizmo commented on GitHub (Sep 21, 2023):

I checked within the python api, and indeed the password get's set to 'None' before the api was called.

Sorry I thought, because the final error message comes from the uptime-server, that the issue is there.
Will open a issue in the python lib

@DatGizmo commented on GitHub (Sep 21, 2023): I checked within the python api, and indeed the password get's set to 'None' before the api was called. Sorry I thought, because the final error message comes from the uptime-server, that the issue is there. Will open a issue in the python lib
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/uptime-kuma#2610
No description provided.