Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nc v12.0.1 - Not possible to change the language of an user #6617

Closed
quenenni opened this issue Sep 22, 2017 · 7 comments
Closed

Nc v12.0.1 - Not possible to change the language of an user #6617

quenenni opened this issue Sep 22, 2017 · 7 comments

Comments

@quenenni
Copy link

Steps to reproduce

  1. Go to a personal page,
  2. Change the language to something else

Expected behaviour

UI in the new selected language

Actual behaviour

Page reload with Ui in the same language

Server configuration

Operating system:

  1. Nextcloud 12.0.0 :
  • Debian 8.9
  • Nginx : v1.12.1-8.5.1.8~jessie1
  • mariadb-server v10.0.32-0+deb8u1
  • Php v7.0.23-1~dotdeb+8.1
  1. Nextcloud 12.0.1 :
  • Debian 9.1
  • Nginx v1.10.3-1+deb9u1 + Apache v2.4.25-3+deb9u3
  • mariadb-server v10.1.26-0+deb9u1
  • Php v7.0+49

Nextcloud version: (see Nextcloud admin page)

$OC_Version = array(12,0,0,29);
$OC_VersionString = '12.0.0';

&

$OC_Version = array(12,0,1,5);
$OC_VersionString = '12.0.1';

Updated from an older Nextcloud/ownCloud or fresh install:
Both

Where did you install Nextcloud from:
Nextcloud v12.0.0 => deb [arch=amd64] https://repo.morph027.de/nextcloud jessie
Nextcloud v12.0.1 => deb http://apt.jurisic.org/debian/ stretch

Signing status:

Signing status
No errors reported

List of activated apps:

App list

Nextcloud v12.0.0:

Enabled:
  - activity: 2.5.2
  - admin_audit: 1.2.0
  - calendar: 1.5.3
  - checksum: 0.3.5
  - comments: 1.2.0
  - contacts: 1.5.3
  - dav: 1.3.0
  - federatedfilesharing: 1.2.0
  - files: 1.7.2
  - files_downloadactivity: 1.1.1
  - files_external: 1.3.0
  - files_pdfviewer: 1.1.1
  - files_retention: 1.1.2
  - files_sharing: 1.4.0
  - files_texteditor: 2.4.1
  - files_trashbin: 1.2.0
  - files_versions: 1.5.0
  - files_videoplayer: 1.1.0
  - firstrunwizard: 2.1
  - gallery: 17.0.0
  - groupfolders: 1.1.0
  - lookup_server_connector: 1.0.0
  - notifications: 2.0.0
  - oauth2: 1.0.5
  - ownpad: 0.5.10
  - passman: 2.1.4
  - password_policy: 1.2.2
  - polls: 0.7.3
  - provisioning_api: 1.2.0
  - quota_warning: 1.1.0
  - ransomware_protection: 1.0.2
  - richdocuments: 1.12.34
  - serverinfo: 1.2.0
  - sharebymail: 1.2.0
  - spreed: 2.0.1
  - survey_client: 1.0.0
  - systemtags: 1.2.0
  - tasks: 0.9.5
  - theming: 1.3.0
  - twofactor_backupcodes: 1.1.1
  - workflowengine: 1.2.0
Disabled:
  - federation
  - impersonate
  - user_external

Nextcloud v12.0.1:

Enabled:
  - activity: 2.5.2
  - admin_audit: 1.2.0
  - calendar: 1.5.3
  - checksum: 0.3.5
  - comments: 1.2.0
  - contacts: 1.5.3
  - dav: 1.3.0
  - federatedfilesharing: 1.2.0
  - files: 1.7.2
  - files_downloadactivity: 1.1.1
  - files_external: 1.3.0
  - files_pdfviewer: 1.1.1
  - files_retention: 1.1.2
  - files_sharing: 1.4.0
  - files_texteditor: 2.4.1
  - files_trashbin: 1.2.0
  - files_versions: 1.5.0
  - files_videoplayer: 1.1.0
  - gallery: 17.0.0
  - groupfolders: 1.1.0
  - lookup_server_connector: 1.0.0
  - notifications: 2.0.0
  - oauth2: 1.0.5
  - ownpad: 0.5.10
  - passman: 2.1.4
  - password_policy: 1.2.2
  - polls: 0.7.3
  - provisioning_api: 1.2.0
  - quota_warning: 1.1.0
  - ransomware_protection: 1.0.2
  - richdocuments: 1.12.34
  - serverinfo: 1.2.0
  - sharebymail: 1.2.0
  - spreed: 2.0.1
  - survey_client: 1.0.0
  - systemtags: 1.2.0
  - tasks: 0.9.5
  - theming: 1.3.0
  - twofactor_backupcodes: 1.1.1
  - workflowengine: 1.2.0
Disabled:
  - federation
  - firstrunwizard
  - impersonate
  - user_external

PS: I tried also to disable all the apps

Nextcloud configuration:

Config report

Nextcloud v12.0.0:

{
    "system": {
        "trusted_domains": [
            "cloud.xxxxxxx.be"
        ],
        "activity_expire_days": 180,
        "appstoreenabled": false,
        "appstore.experimental.enabled": true,
        "datadirectory": "\/home\/nextcloud\/instances\/xxxxxxx\/data",
        "data-fingerprint": "",
        "dbhost": "localhost",
        "dbname": "xxxxxxxx",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "oc_",
        "dbtype": "mysql",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "default_language": "fr",
        "hashingCost": 10,
        "htaccess.RewriteBase": "\/",
        "installed": true,
        "instanceid": "*********",
        "logfile": "\/var\/log\/nextcloud\/xxxx.log",
        "logtimezone": "Europe\/Brussels",
        "mail_domain": "cloud.xxxx.be",
        "mail_from_address": "nextcloud",
        "mail_smtphost": "127.0.0.1",
        "mail_smtpmode": "smtp",
        "mail_smtpport": 25,
        "maintenance": false,
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "minimum.supported.desktop.version": "2.1.0",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "preview_libreoffice_path": "\/usr\/bin\/libreoffice",
        "preview_max_filesize_image": 5,
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trashbin_retention_obligation": "60, 90",
        "updatechecker": false,
        "upgrade.disable-web": false,
        "version": "12.0.0.29",
        "versions_retention_obligation": "60, 90",
        "loglevel": 2,
        "overwrite.cli.url": "https:\/\/cloud.xxxx.be"
    }
}

Nextcloud v12.0.1:

{
    "system": {
        "trusted_domains": [
            "xxxxxxxx.yyyyyy.org"
        ],
        "activity_expire_days": 180,
        "appstoreenabled": false,
        "appstore.experimental.enabled": true,
        "datadirectory": "\/home\/nextcloud\/instances\/xxxxxxx\/data",
        "data-fingerprint": "",
        "dbhost": "localhost",
        "dbname": "xxxxxxxx",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "",
        "dbtype": "mysql",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "default_language": "fr",
        "hashingCost": 10,
        "htaccess.RewriteBase": "\/",
        "installed": true,
        "instanceid": "xxxxxx",
        "logfile": "\/var\/log\/nextcloud\/xxxxxxxx.log",
        "logtimezone": "Europe\/Brussels",
        "mail_domain": "xxxxx.yyyyyy.org",
        "mail_from_address": "nextcloud",
        "mail_smtphost": "127.0.0.1",
        "mail_smtpmode": "smtp",
        "mail_smtpport": 25,
        "maintenance": false,
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "minimum.supported.desktop.version": "2.1.0",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "preview_libreoffice_path": "\/usr\/bin\/libreoffice",
        "preview_max_filesize_image": 5,
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trashbin_retention_obligation": "60, 90",
        "updatechecker": false,
        "upgrade.disable-web": false,
        "version": "12.0.1.5",
        "versions_retention_obligation": "60, 90",
        "overwrite.cli.url": "xxxxx.yyyyyyy.org",
        "dbport": ""
    }
}

Are you using external storage, if yes which one: local/smb/sftp/...
No

Are you using encryption: yes/no

No

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...

No

Logs

Web server error log

Web server error log

Nextcloud 12.0.0

xxx.xxx.xxx.xxx - - [22/Sep/2017:20:39:49 +0200] "POST /settings/ajax/setlanguage.php HTTP/1.1" 200 2 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0" "-" "cloud.xxxxxx.be"

Nextcloud v12.0.1:

xxx.xxx.xxx.xxx - - [22/Sep/2017:20:41:55 +0200] "PUT /ocs/v2.php/cloud/users/admin_dp HTTP/2.0" 401 379 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0" "-" "xxxx.yyyyy.org"

Nextcloud log (data/nextcloud.log)

Nextcloud log

Nothing

Browser log

Browser log

Nextcloud 12.0.0

The page reload just after the new selection. I don't have time to see / copy it

Nextcloud 12.0.1:

PUT https://jelmmt.bruxxel.org/ocs/v2.php/cloud/users/admin 401 Unauthorized

=> Response:
<?xml version="1.0"?>
<ocs>
 <meta>
  <status>failure</status>
  <statuscode>997</statuscode>
  <message></message>
 </meta>
 <data/>
</ocs>

@quenenni
Copy link
Author

It seems there were changes between 12.0.0 and 12.0.1.

In 12.0.0, it was a POST request
In 12.0.1, it's a PUT request

I also checked with curl:

curl -X PUT -v -H "OCS-APIRequest: true" -d 'key=language' -d 'value=fr' -u 'admin:xxxxxxx' https://cloud.xxxx.be/ocs/v2.php/cloud/users/admin
< HTTP/2 401 
< server: nginx
< date: Fri, 22 Sep 2017 19:10:40 GMT
< content-type: application/xml; charset=utf-8
< content-length: 170
< expires: Thu, 19 Nov 1981 08:52:00 GMT
< pragma: no-cache
< set-cookie: oc_sessionPassphrase=JBMdQIEXXsWC%2FHZH9j2izGH%2B%2FPx67bWeACGFjuuiMhlig32BOE2wDIZaJuZGOfCVKmV35FW%2F%2FEM8dkc10ev09%2FQjcB3pxJ47Sa%2BgTitGuyMMWWbsmOBXEnLk6jWH9CwKZ; path=/; secure; HttpOnly
< x-frame-options: SAMEORIGIN
< set-cookie: __Host-nc_sameSiteCookielax=true; path=/; httponly;secure; expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=lax
< set-cookie: __Host-nc_sameSiteCookiestrict=true; path=/; httponly;secure; expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=strict
< set-cookie: yzQRKcZ=5ojakc7jrgqbh62g84h4beu571; path=/; secure; HttpOnly
< cache-control: no-cache, no-store, must-revalidate
< content-security-policy: default-src 'none';base-uri 'none';manifest-src 'self'
< 
<?xml version="1.0"?>
<ocs>
 <meta>
  <status>failure</status>
  <statuscode>997</statuscode>
  <message>Current user is not logged in</message>
 </meta>
 <data/>
</ocs>
* Curl_http_done: called premature == 0

@quenenni
Copy link
Author

In the meantime, I really need to change the language of users because the calendars show the dates in the wrong format.

Can I just change a value in the db for each user and that will be enough to activate everything needed?

@nickvergessen
Copy link
Member

Can I just change a value in the db for each user and that will be enough to activate everything needed?

Yes, that should work.

The error you are seeing above seems to point to an authentication error.
It works fine for me on my development instance:

$ curl -k -v https://nextcloud13.local/ocs/v2.php/cloud/users/admin -d key=language -d value=sv -u admin:admin -H 'OCS-APIRequest: true' -X PUT

< HTTP/1.1 200 OK
< Date: Mon, 25 Sep 2017 14:41:11 GMT
< Server: Apache/2.4.27 (Ubuntu)

<?xml version="1.0"?>
<ocs>
 <meta>
  <status>ok</status>
  <statuscode>200</statuscode>
  <message>OK</message>
 </meta>
 <data/>
</ocs>

@quenenni
Copy link
Author

I didn't know the curl command and more or less copied from another post/
I tried with the same params and params format as you:

curl -k -v https://cloud.xxxxx.net/ocs/v2.php/cloud/users/admin -d key=language -d value=fr -u admin:admin -H 'OCS-APIRequest: true' -X PUT

and the answer is:

<?xml version="1.0"?>
<ocs>
 <meta>
  <status>failure</status>
  <statuscode>997</statuscode>
  <message></message>
 </meta>
 <data/>
</ocs>

You say you need more infos.
What infos do you need exactly?

@nickvergessen
Copy link
Member

Well 997 means the user trying to perform the request is invalid or the password is wrong

@quenenni
Copy link
Author

I'm sorry, but my login / passwd are good

I have the same problem when I try to change from inside the web interface, and if I'm there, it means I'm logged correctly.

@quenenni
Copy link
Author

But I just discovered that v12.0.3 doesn't have the problem. I can change the language.
As I have to upgrade all my instances to v12.0.3 because of another nasty bug, I guess this problem is not a problem anymore.
It's more up to you now to decide if you want to correct that for v12.0.1... or close the ticket.
(well, if you need me more tests, I'll gladly do them)

Thanks a lot for having taken the time to help me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants