deconz-rest-plugin: resetPassword - /api/config/password can't be use without phoscon

Describe the bug

The documentation say that I can reset the password by using a DELETE request on /api/config/password but each time I get an unauthorized user response.

Steps to reproduce the behavior

Make a DELETE request on /api/config/password

Expected behavior

The gateway should reset the password and return a 200 code.

Screenshots

Environment

  • Host system: Windows
  • Running method: Windows
  • Firmware version: 0x26720700
  • deCONZ version: 2.21.1
  • Device: ConBee II
  • Do you use an USB extension cable: no
  • Is there any other USB or serial devices connected to the host system? If so: Which?

deCONZ Logs

Additional context

For some reason the code is checking for the Referer header and the pattern set seems to accept only Phoscon like login URL. https://github.com/dresden-elektronik/deconz-rest-plugin/blob/4d366e41856bf7b06c6b76b116dcc48ef29b6c9d/rest_configuration.cpp#L2726-L2732

Can we remove this code ?

Thanks

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 22 (10 by maintainers)

Most upvoted comments

If you want you cant test it on the playground page of the rest-client I building : https://deconz-community.github.io/rest-client/ https://deconz-community.github.io/rest-client/login.html/

look for resetPassword on the page to find the correct endpoint to call

Surely agree on the documentation. The rest can/should be discussed (guess where) 🙂