Chaning password via curl and cli-client

Issue #433 resolved
Former user created an issue

When I change default scmadmin password via cli-client I can login with "scmadmin" password and with new password. I must restart Tomcat to "delete" old password.

java -jar scm-cli-client-1.33-jar-with-dependencies.jar --user scmadmin --password scmadmin --server http://mojtest1.localdomain:8080/scm/ modify-user scmadmin -p abc

When I try change password via curl:

curl -u scmadmin:scmadmin -X POST --data "old-password=scmadmin&new-password=abc&confirm-password=abc" http://mojtest1.localdomain:8080/scm/api/rest/action/change-password

This is result from server:

HTTP Status 400 - Bad Request
The request sent by the client was syntactically incorrect.

Best regards,

Comments (4)

  1. Sebastian Sdorra repo owner
    • changed status to open

    The problem that you are able to authenticate with both passwords, comes from the authentication cache. The authentication is cached for 60 seconds, so you don't have to restart your application server. The curl problem comes from the fact that scm-manager does not know how to answer your request with json or xml. So you have to append a .json or .xml to the rest url.

  2. Log in to comment