You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Improve quota validation including a regexp which matches expected formats #25358
Curently an admin user can enter a number probably followed by letters.
For example: "200", "15MB" or "5 GB" "20B".
Basically it's a number probably followed by letters.
Also floating point can be entered, but only in english style "2.5GB". Using a non english format for floats will lead to an old bug "4,5GB" also something like "45/0".
So the proposed enhancement by @PVince81 in #25253 is to develop a regexp to validate better this values.
reopening as this is not fixed yet #27257 only fixed the function that could potentially be used for validation but its not implemented in the onQuotaSelect function.
maybe I should not have put in "prerapation to fix #25358" in the header of the PR
Activity
PVince81 commentedon Jul 5, 2016
Thanks for the ticket, makes sense
andypmw commentedon Oct 6, 2016
Hi guys, I am create a regex formula for this issue:
^( +)?([+-])?[\s+]?([0-9]*)(\.([0-9]+))?( +)?(b|kb|mb|gb|tb|pb|eb|zb|yb)?I will try to write on PHP and create pull request
PVince81 commentedon Oct 7, 2016
@andypmw sounds good, thanks!
SergioBertolinSG commentedon Oct 7, 2016
I guess this validation should be done in the frontend: settings/js/users/users.js https://github.com/owncloud/core/blob/master/settings/js/users/users.js
JKawohl commentedon Oct 25, 2016
@andypmw Did you make any progress yet?
PVince81 commentedon Dec 8, 2016
@ppaysant has added a new JS method for parsing this kind of strings, see #26789
SamuAlfageme commentedon Dec 14, 2016
Think this is a must, since input an invalid quota (e.g. any alphanumeric string) and you'll end up with this funky quota list made with
Bs:Note that the last "
Other" option has been replaced by anotherB.individual-it commentedon Feb 28, 2017
reopening as this is not fixed yet #27257 only fixed the function that could potentially be used for validation but its not implemented in the onQuotaSelect function.
maybe I should not have put in "prerapation to fix #25358" in the header of the PR
fix computerFileSize to parse correctly, prerapation to fix #25358 (#…
SergioBertolinSG commentedon Mar 8, 2017
Tested and works fine.
But repeated values are added to the dropdown. They vanish when reloading the page. @PVince81 there is an open issue about this bug? I cannot find it.
phil-davis commentedon Sep 27, 2017
The fix here did not allow a 0 byte quota to be entered. See separate issue #29105 and PR #29109
phil-davis commentedon Sep 29, 2017
@SergioBertolinSG I raised a separate issue #29122 for the repeated values added to the dropdown.
lock commentedon Aug 2, 2019
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.