owncloud / android

:phone: The ownCloud Android App
GNU General Public License v2.0
3.79k stars 3.05k forks source link

[BUG] Improve message when password policy does not match #4268

Closed jesmrec closed 8 months ago

jesmrec commented 8 months ago

no matter if oC10 or oCIS, when password policy enabled (by default in oCIS 5.0.0+)

Steps to reproduce

  1. Create a link over any item
  2. Add a password that does not match the policy

Actual behaviour

It was not posible to share this file or folder because wrong username or password.

Expected behaviour

Server should return 403 (now oCIS returns 400) in the following response:

<?xml version="1.0" encoding="UTF-8"?>
<ocs>
  <meta>
    <status>error</status>
    <statuscode>400</statuscode>
    <message>At least 8 characters are required
at least 1 uppercase letters are required
at least 1 numbers are required
at least 1 special characters are required  !"#$%&amp;'()*+,-./:;&lt;=&gt;?@[\]^_`{|}~</message>
  </meta>
</ocs>

Error in <message> should be printed directly. It seems we are translating the error to other internal string.

JuancaG05 commented 8 months ago

This would be kind of complicated since the content of the HTTP response's body is in JSON and we just parse XML now, it would imply changes in the core of network calls handling logic. Closing this, working on password policy directly with capabilities: