stalwartlabs / webadmin

Web-based admin for Stalwart Mail Server
https://stalw.art
71 stars 16 forks source link

Unable to update accounts with @ in their username #21

Closed amengus87 closed 2 months ago

amengus87 commented 2 months ago

When we want to update a user with username having '@' character we obtain a 404 error :

curl 'https://stalwart.xyz/api/principal/xyz@abc.com' \
-X 'PATCH' \
-H 'Content-Type: text/plain;charset=UTF-8' \
--data-binary '[{"action":"set","field":"quota","value":1073741824}]'

404 page not found

Originally posted by @amengus87 in https://github.com/stalwartlabs/mail-server/issues/761#issuecomment-2354708828

mdecimus commented 2 months ago

You need to encode the address.

amengus87 commented 2 months ago

We can't as we are using your own UI! The curl example is only to show you what is done behind the web browser.

If you create a user with webadmin ui you will be able to reproduce, the bug is the same as : https://github.com/stalwartlabs/mail-server/issues/761#issuecomment-2354708828

mdecimus commented 2 months ago

@amengus87 try upgrading to the latest webadmin version. If it is working properly at the moment.

amengus87 commented 2 months ago

@mdecimus Same on the latest release : image

mdecimus commented 2 months ago

Try updating both Stalwart and the webadmin to the latest version.

amengus87 commented 2 months ago

@mdecimus Done this morning too

mdecimus commented 1 month ago

Please set the logging level to trace and check your server logs for more details.

amengus87 commented 1 month ago

@mdecimus We are now using the CLI instead of the webui. Works inside CLI

mdecimus commented 1 month ago

That's fine but please note that the user management functionality has been removed from the CLI in v0.10.0.

amengus87 commented 1 month ago

That's fine but please note that the user management functionality has been removed from the CLI in v0.10.0.

Good to know :)

Just found the problem => Our reverse proxy wasn't allowing 'PATCH' methods to pass through.

Sorry for any trouble and time lost