nextcloud / nextcloud/server

[Bug]: UI error re locale use on numbers when assigning quota values

Open
#59,548 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop 32-feedback bug feature: users and groups
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

⚠️ This issue respects the following points: ⚠️
Bug description

I have tried this more than once, using latest (32?) version.
Create a new user. Go to set quota, enter value "1000GB". Press return.
See that the value is "1,000 GB" (this is critical). It looks ok. I want it to mean 1 TB for this user.
There is a locale error here in how this number is going to get interpreted, of US vs European numbers and use of commas vs periods. Upon hitting Enter, NC has take the value I typed and interpreted it into something looks ok as a US number, but then it decides, because of the US vs European locale difference, that I entered 1.000 GB, and it give me a quota of 1 GB. I expect that many variations of this would produce the same failure.

Steps to reproduce
  1. create new user
  2. go to give them a custom quota value of 1000TB
  3. see that that 1000 has been changed to 1,000 -- that means something different between US and Europe. To me in the US it means one thousand, in Europe it means one exactly
  4. try uploading 2 GB of files. This will error out from exceeding quota, because the number I entered got modified by the software to a very different number, because there's a locale failure here somewhere.
Expected behavior

If I enter 1000, I should get 1000, not "1,000"

Nextcloud Server version

32

Operating system

Debian/Ubuntu

PHP engine version

None

Web server

None

Database engine version

None

Is this bug present after an update or on a fresh install?

Fresh Nextcloud Server install

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?
  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other
Configuration report
the config is the default that happens when you install Ubuntu. I haven't made any changes to that. whatever that install does is what I have in place. I don't know what web-server, database, etc. Whatever the defaults are are what I have.
List of activated Apps
unknown. I've just done a full reinstall so I can fix the regrettably bizarre business about the real size of the default LVM leaving a huge amount of disk as unallocated free space
Nextcloud Signing status
unknown. I've just done a full reinstall so I can fix the regrettably bizarre business about the real size of the default LVM leaving a huge amount of disk as unallocated free space
Nextcloud Logs
unknown. I've just done a full reinstall so I can fix the regrettably bizarre business about the real size of the default LVM leaving a huge amount of disk as unallocated free space
Additional info

I've just done a full reinstall so I can fix the regrettably bizarre business about the real size of the default LVM leaving a huge amount of disk as unallocated free space.
Having figured out the bug, and a workaround, I will be doing that now.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue from the new-user flow: open the custom quota field, enter 1000GB, and press Enter under the affected locale. Trace the quota value from that UI entry point through parsing and display, then verify that 1000 is retained as 1000 and that a user can upload within the resulting quota.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
frontend, internationalization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.