haiwen / seafile-client

Seafile desktop client.
http://seafile.com
Apache License 2.0
469 stars 281 forks source link

shared link password length limit is hard coded #1458

Open ThatLurker opened 1 year ago

ThatLurker commented 1 year ago

Currently, the shared link password minimum limit is hard coded in the shared link dialog. This poses a problem when the server's minimum password limit is changed to a higher number. In such cases, if a user attempts to create a shared link with a password that is lower than the server limit, no error handling is triggered, and nothing happens.

QLabel *password_label = new QLabel(tr("Password(At least 8 characters)"));

https://github.com/haiwen/seafile-client/blob/master/src/filebrowser/sharedlink-dialog.cpp#L24

The best way would be to retrieve the minimum password limit from the server dynamically if possible, so that the user knows why nothing happens when they have typed a password that is lower than the set minimum.