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

Cannot set admin's e-mail address #13127

Closed
pylorak opened this issue Dec 17, 2018 · 31 comments
Closed

Cannot set admin's e-mail address #13127

pylorak opened this issue Dec 17, 2018 · 31 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug feature: users and groups

Comments

@pylorak
Copy link

pylorak commented Dec 17, 2018

I log in as the admin user, and I go to Users. After entering a valid e-mail address (previously missing) for the admin, I get error "An error occured during the request. Unable to proceed." Refreshing the page or loading Settings->Personal Info confirms that the e-mail address has not been saved.

In Setttings->Logging no message is visible.

Setting the e-mail address (changing and adding both) works as expected for other (non-admin) users.

Nextcloud version: 15.0.0 (but issue also existed on 14.0.3)

EDIT: Here is a screen recording demonstrating the issue: link

@pylorak pylorak added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Dec 17, 2018
@giraudeo
Copy link

Hello,

I tried on my instance (Nextcloud 15.0.0), and it worked fine.
I went as you said:

  • log in as Admin -> Users -> wrote a random email address and press enter
  • spinning wheel for few sec, and the email was saved

If I go to " Settings", I can now see the email address.

I did the same to delete, and it worked too.

Could you provide last entries of the log file after you try?

(I have no SMTP server configured)

Regards,

Olivier

@pylorak
Copy link
Author

pylorak commented Dec 17, 2018

Hi Olivier,

Yes, that's correct, that's exactly what I do too, but as I said for me it does not work for the admin user. It does work for other users (well, I actually only have one other user).

Here are the last couple of lines form the logfile. I see no relevant error there. I tried setting the admin's e-mail address many times since the version upgrade in the logfile.

{"reqId":"IBfVwksBP8s8WwERk3wG","level":1,"time":"2018-12-17T14:52:59+00:00","remoteAddr":"84.236.52.110","user":"--","app":"updater","method":"GET","url":"\/core\/ajax\/update.php?requesttoken=p5T7xMv4b3ZPqfHu8ZrlDxo%2F3yskyEhnOQYpN7HDWgQ%3D%3A4s3Jo73XDkQ407qhkuyRZnxMjEFLvxwdfDBFed73CWw%3D","message":"\\OC\\Repair::step: Repair step: Repair pending cron jobs","userAgent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Gecko\/20100101 Firefox\/64.0","version":"14.0.3.0"}
{"reqId":"IBfVwksBP8s8WwERk3wG","level":1,"time":"2018-12-17T14:52:59+00:00","remoteAddr":"84.236.52.110","user":"--","app":"updater","method":"GET","url":"\/core\/ajax\/update.php?requesttoken=p5T7xMv4b3ZPqfHu8ZrlDxo%2F3yskyEhnOQYpN7HDWgQ%3D%3A4s3Jo73XDkQ407qhkuyRZnxMjEFLvxwdfDBFed73CWw%3D","message":"\\OC\\Repair::info: Repair info: No need to repair pending cron jobs.","userAgent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Gecko\/20100101 Firefox\/64.0","version":"14.0.3.0"}
{"reqId":"IBfVwksBP8s8WwERk3wG","level":1,"time":"2018-12-17T14:52:59+00:00","remoteAddr":"84.236.52.110","user":"--","app":"updater","method":"GET","url":"\/core\/ajax\/update.php?requesttoken=p5T7xMv4b3ZPqfHu8ZrlDxo%2F3yskyEhnOQYpN7HDWgQ%3D%3A4s3Jo73XDkQ407qhkuyRZnxMjEFLvxwdfDBFed73CWw%3D","message":"\\OC\\Repair::step: Repair step: Extract the vcard uid and store it in the db","userAgent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Gecko\/20100101 Firefox\/64.0","version":"14.0.3.0"}
{"reqId":"IBfVwksBP8s8WwERk3wG","level":1,"time":"2018-12-17T14:52:59+00:00","remoteAddr":"84.236.52.110","user":"--","app":"updater","method":"GET","url":"\/core\/ajax\/update.php?requesttoken=p5T7xMv4b3ZPqfHu8ZrlDxo%2F3yskyEhnOQYpN7HDWgQ%3D%3A4s3Jo73XDkQ407qhkuyRZnxMjEFLvxwdfDBFed73CWw%3D","message":"\\OC\\Repair::info: Repair info: Fixed 109 vcards","userAgent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Gecko\/20100101 Firefox\/64.0","version":"14.0.3.0"}
{"reqId":"IBfVwksBP8s8WwERk3wG","level":1,"time":"2018-12-17T14:52:59+00:00","remoteAddr":"84.236.52.110","user":"--","app":"updater","method":"GET","url":"\/core\/ajax\/update.php?requesttoken=p5T7xMv4b3ZPqfHu8ZrlDxo%2F3yskyEhnOQYpN7HDWgQ%3D%3A4s3Jo73XDkQ407qhkuyRZnxMjEFLvxwdfDBFed73CWw%3D","message":"\\OC\\Updater::startCheckCodeIntegrity: Starting code integrity check...","userAgent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Gecko\/20100101 Firefox\/64.0","version":"14.0.3.0"}
{"reqId":"IBfVwksBP8s8WwERk3wG","level":1,"time":"2018-12-17T14:53:02+00:00","remoteAddr":"84.236.52.110","user":"--","app":"updater","method":"GET","url":"\/core\/ajax\/update.php?requesttoken=p5T7xMv4b3ZPqfHu8ZrlDxo%2F3yskyEhnOQYpN7HDWgQ%3D%3A4s3Jo73XDkQ407qhkuyRZnxMjEFLvxwdfDBFed73CWw%3D","message":"\\OC\\Updater::finishedCheckCodeIntegrity: Finished code integrity check","userAgent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Gecko\/20100101 Firefox\/64.0","version":"14.0.3.0"}
{"reqId":"IBfVwksBP8s8WwERk3wG","level":1,"time":"2018-12-17T14:53:02+00:00","remoteAddr":"84.236.52.110","user":"--","app":"updater","method":"GET","url":"\/core\/ajax\/update.php?requesttoken=p5T7xMv4b3ZPqfHu8ZrlDxo%2F3yskyEhnOQYpN7HDWgQ%3D%3A4s3Jo73XDkQ407qhkuyRZnxMjEFLvxwdfDBFed73CWw%3D","message":"\\OC\\Updater::updateEnd: Update successful","userAgent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Gecko\/20100101 Firefox\/64.0","version":"15.0.0.10"}
{"reqId":"IBfVwksBP8s8WwERk3wG","level":1,"time":"2018-12-17T14:53:02+00:00","remoteAddr":"84.236.52.110","user":"--","app":"updater","method":"GET","url":"\/core\/ajax\/update.php?requesttoken=p5T7xMv4b3ZPqfHu8ZrlDxo%2F3yskyEhnOQYpN7HDWgQ%3D%3A4s3Jo73XDkQ407qhkuyRZnxMjEFLvxwdfDBFed73CWw%3D","message":"\\OC\\Updater::maintenanceDisabled: Turned off maintenance mode","userAgent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Gecko\/20100101 Firefox\/64.0","version":"15.0.0.10"}
{"reqId":"IBfVwksBP8s8WwERk3wG","level":1,"time":"2018-12-17T14:53:02+00:00","remoteAddr":"84.236.52.110","user":"--","app":"updater","method":"GET","url":"\/core\/ajax\/update.php?requesttoken=p5T7xMv4b3ZPqfHu8ZrlDxo%2F3yskyEhnOQYpN7HDWgQ%3D%3A4s3Jo73XDkQ407qhkuyRZnxMjEFLvxwdfDBFed73CWw%3D","message":"\\OC\\Updater::resetLogLevel: Reset log level to Info(1)","userAgent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Gecko\/20100101 Firefox\/64.0","version":"15.0.0.10"}
{"reqId":"IM9jB1SoPqM2uwAzwjnf","level":1,"time":"2018-12-17T15:00:13+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"\/data\/www\/pados\/cloud.pados.hu\/data\/updater-oc5f06899c64\/backups exists - start to clean it up","userAgent":"--","version":"15.0.0.10"}
{"reqId":"IM9jB1SoPqM2uwAzwjnf","level":1,"time":"2018-12-17T15:00:13+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"List of all directories that will be deleted: []","userAgent":"--","version":"15.0.0.10"}
{"reqId":"IM9jB1SoPqM2uwAzwjnf","level":1,"time":"2018-12-17T15:00:13+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Cleanup finished","userAgent":"--","version":"15.0.0.10"}
{"reqId":"u8Q07OJWlZTCyLIQUb17","level":2,"time":"2018-12-17T15:08:24+00:00","remoteAddr":"84.236.52.110","user":"--","app":"core","method":"POST","url":"\/index.php\/login?redirect_url=\/index.php\/settings\/user","message":"Login failed: 'admin' (Remote IP: '84.236.52.110')","userAgent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Gecko\/20100101 Firefox\/64.0","version":"15.0.0.10"}
{"reqId":"u8Q07OJWlZTCyLIQUb17","level":1,"time":"2018-12-17T15:08:24+00:00","remoteAddr":"84.236.52.110","user":"--","app":"core","method":"POST","url":"\/index.php\/login?redirect_url=\/index.php\/settings\/user","message":"Bruteforce attempt from \"84.236.52.110\" detected for action \"login\".","userAgent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Gecko\/20100101 Firefox\/64.0","version":"15.0.0.10"}
{"reqId":"JjgKVtN2BDPs1chOxvL7","level":1,"time":"2018-12-17T15:15:15+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Error while sending usage statistic","userAgent":"--","version":"15.0.0.10"}

Thanks for the help,
Karoly

@giraudeo
Copy link

If it can help, you can increase the log verbosity:
as Admin, you go in Settings -> logging (bottom of the left menu) -> click on the " ..." next to level and enable "debug"

then try again.

Just for comparison, I got those 4 lines when I pressed the enter button:
{"reqId":"no6P2OczszRjFhsuG0hF","level":0,"time":"2018-12-17T22:34:23+00:00","remoteAddr":"X.X.X.X","user":"admin","app":"no app in context","method":"PUT","url":"\/nextcloud\/ocs\/v2.php\/cloud\/users\/admin","message":"No cache entry found for \/appdata_ocmq2acqri4z\/avatar\/admin\/avatar.jpg (storage: local::\/usr\/local\/www\/nextcloud\/data\/, internalPath: appdata_ocmq2acqri4z\/avatar\/admin\/avatar.jpg)","userAgent":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit\/605.1.15 (KHTML, like Gecko) Version\/12.0.2 Safari\/605.1.15","version":"15.0.0.10"} {"reqId":"no6P2OczszRjFhsuG0hF","level":0,"time":"2018-12-17T22:34:23+00:00","remoteAddr":"X.X.X.X","user":"admin","app":"no app in context","method":"PUT","url":"\/nextcloud\/ocs\/v2.php\/cloud\/users\/admin","message":"No cache entry found for \/appdata_ocmq2acqri4z\/dav-photocache\/7e04f0290d19a57925395ce78ef282a0 (storage: local::\/usr\/local\/www\/nextcloud\/data\/, internalPath: appdata_ocmq2acqri4z\/dav-photocache\/7e04f0290d19a57925395ce78ef282a0)","userAgent":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit\/605.1.15 (KHTML, like Gecko) Version\/12.0.2 Safari\/605.1.15","version":"15.0.0.10"} {"reqId":"no6P2OczszRjFhsuG0hF","level":0,"time":"2018-12-17T22:34:23+00:00","remoteAddr":"X.X.X.X","user":"admin","app":"no app in context","method":"PUT","url":"\/nextcloud\/ocs\/v2.php\/cloud\/users\/admin","message":"No cache entry found for \/appdata_ocmq2acqri4z\/avatar\/admin\/avatar.jpg (storage: local::\/usr\/local\/www\/nextcloud\/data\/, internalPath: appdata_ocmq2acqri4z\/avatar\/admin\/avatar.jpg)","userAgent":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit\/605.1.15 (KHTML, like Gecko) Version\/12.0.2 Safari\/605.1.15","version":"15.0.0.10"} {"reqId":"no6P2OczszRjFhsuG0hF","level":0,"time":"2018-12-17T22:34:23+00:00","remoteAddr":"X.X.X.X","user":"admin","app":"no app in context","method":"PUT","url":"\/nextcloud\/ocs\/v2.php\/cloud\/users\/admin","message":"No cache entry found for \/appdata_ocmq2acqri4z\/dav-photocache\/7e04f0290d19a57925395ce78ef282a0 (storage: local::\/usr\/local\/www\/nextcloud\/data\/, internalPath: appdata_ocmq2acqri4z\/dav-photocache\/7e04f0290d19a57925395ce78ef282a0)","userAgent":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit\/605.1.15 (KHTML, like Gecko) Version\/12.0.2 Safari\/605.1.15","version":"15.0.0.10"}

Do you have any errors on your web server logs?

Is it failing only with the email field? Or same behaviour with any Admin info (Full name, language, etc)?

Regards,

Olivier

@pylorak
Copy link
Author

pylorak commented Dec 17, 2018

Hi,

  • Log verbosity is already at maximum
  • I also cannot set the admin's display name (so it seems issue is not specific to e-mail field)
  • But I do can set things under Settings->Personal Info
  • I see no errors in either apache's or php's log

I made a small screen recording to demonstrate the issue and the above points. I shared it using my NextCloud: link

@giraudeo
Copy link

Hello Karoly,

If all log levels are configured, you must get something in the Nextcloud.log file.
Do you have such an entry in the config.php file:

'loglevel' => 0,

Regards,

Olivier

@pylorak
Copy link
Author

pylorak commented Dec 18, 2018

Ok, I had loglevel 1 in config.php, now I set it to 0.

Setting the admin's e-mail or display name still produces no new lines in the logfile.

Setting the loglevel to 0 worked though, because now setting the non-admin's e-mail produces the following messages:

{"reqId":"htLXQfeHZbD9b25qzwoD","level":0,"time":"2018-12-18T10:47:21+00:00","remoteAddr":"84.236.52.110","user":"admin","app":"no app in context","method":"PUT","url":"\/ocs\/v2.php\/cloud\/users\/pylo","message":"No cache entry found for \/appdata_oc5f06899c64\/avatar\/pylo\/avatar.jpg (storage: local::\/data\/www\/pados\/cloud.pados.hu\/data\/, internalPath: appdata_oc5f06899c64\/avatar\/pylo\/avatar.jpg)","userAgent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Gecko\/20100101 Firefox\/64.0","version":"15.0.0.10"}
{"reqId":"htLXQfeHZbD9b25qzwoD","level":0,"time":"2018-12-18T10:47:21+00:00","remoteAddr":"84.236.52.110","user":"admin","app":"no app in context","method":"PUT","url":"\/ocs\/v2.php\/cloud\/users\/pylo","message":"No cache entry found for \/appdata_oc5f06899c64\/dav-photocache\/6df26bd63ec446d6a9d15b20398991ef (storage: local::\/data\/www\/pados\/cloud.pados.hu\/data\/, internalPath: appdata_oc5f06899c64\/dav-photocache\/6df26bd63ec446d6a9d15b20398991ef)","userAgent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Gecko\/20100101 Firefox\/64.0","version":"15.0.0.10"}
{"reqId":"htLXQfeHZbD9b25qzwoD","level":0,"time":"2018-12-18T10:47:21+00:00","remoteAddr":"84.236.52.110","user":"admin","app":"no app in context","method":"PUT","url":"\/ocs\/v2.php\/cloud\/users\/pylo","message":"No cache entry found for \/appdata_oc5f06899c64\/avatar\/pylo\/avatar.jpg (storage: local::\/data\/www\/pados\/cloud.pados.hu\/data\/, internalPath: appdata_oc5f06899c64\/avatar\/pylo\/avatar.jpg)","userAgent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Gecko\/20100101 Firefox\/64.0","version":"15.0.0.10"}
{"reqId":"htLXQfeHZbD9b25qzwoD","level":0,"time":"2018-12-18T10:47:21+00:00","remoteAddr":"84.236.52.110","user":"admin","app":"no app in context","method":"PUT","url":"\/ocs\/v2.php\/cloud\/users\/pylo","message":"No cache entry found for \/appdata_oc5f06899c64\/dav-photocache\/6df26bd63ec446d6a9d15b20398991ef (storage: local::\/data\/www\/pados\/cloud.pados.hu\/data\/, internalPath: appdata_oc5f06899c64\/dav-photocache\/6df26bd63ec446d6a9d15b20398991ef)","userAgent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Gecko\/20100101 Firefox\/64.0","version":"15.0.0.10"}

@kesselb
Copy link
Contributor

kesselb commented Dec 18, 2018

@skjnldsv could you post your howto here how to share the output from browser inspector?

@skjnldsv
Copy link
Member

Hello!
I will need your browser console log to investigate this issue.
Open your console, reload your page and/or do the action leading to this issue and copy/paste the log in this thread.

How to access your browser console (Click to expand)

Chrome

  • Press either CTRL + SHIFT + J to open the “console” tab of the Developer Tools.
  • Alternative method:
    1. Press either CTRL + SHIFT + I or F12 to open the Developer Tools.
    2. Click the “console” tab.

Safari

  • Press CMD + ALT + I to open the Web Inspector.
  • See Chrome’s step 2. (Chrome and Safari have pretty much identical dev tools.)

IE9

  1. Press F12 to open the developer tools.
  2. Click the “console” tab.

Firefox

  • Press CTRL + SHIFT + K to open the Web console (COMMAND + SHIFT + K on Macs).
  • or, if Firebug is installed (recommended):
    1. Press F12 to open Firebug.
    2. Click on the “console” tab.

Opera

  1. Press CTRL + SHIFT + I to open Dragonfly.
  2. Click on the “console” tab.

@pylorak
Copy link
Author

pylorak commented Dec 18, 2018

Hi,

I did the following:

  1. I opened the console in Firefox using Ctrl+Shift+K
  2. I cleared all console messages
  3. I reloaded the page (Users)
  4. I entered a valid e-mail address for the admin and pressed enter

Here are the contents of the console after the above actions:

GEThttps://cloud.pados.hu/index.php/settings/users
[HTTP/1.1 200 OK 894ms]
GEThttps://cloud.pados.hu/core/vendor/select2/select2.css?v=cd6a495c-0
[HTTP/1.1 200 OK 35ms]
GEThttps://cloud.pados.hu/core/vendor/jquery-ui/themes/base/jquery-ui.css?v=cd6a495c-0
[HTTP/1.1 200 OK 573ms]
GEThttps://cloud.pados.hu/index.php/css/core/7838-53ce-jquery-ui-fixes.css?v=db81cddf52fdb3c8ca1e4c859e214124?v=cd6a495c-0
[HTTP/1.1 200 OK 1036ms]
GEThttps://cloud.pados.hu/index.php/css/core/7838-53ce-server.css?v=db81cddf52fdb3c8ca1e4c859e214124?v=cd6a495c-0
[HTTP/1.1 200 OK 2155ms]
GEThttps://cloud.pados.hu/index.php/css/core/7838-53ce-css-variables.css?v=db81cddf52fdb3c8ca1e4c859e214124?v=cd6a495c-0
[HTTP/1.1 200 OK 503ms]
GEThttps://cloud.pados.hu/apps/files_pdfviewer/css/style.css?v=1bf6e69c-0
[HTTP/1.1 200 OK 173ms]
GEThttps://cloud.pados.hu/apps/files_videoplayer/css/style.css?v=1bf6e69c-0
[HTTP/1.1 200 OK 145ms]
GEThttps://cloud.pados.hu/index.php/css/firstrunwizard/0d6d-53ce-firstrunwizard.css?v=db81cddf52fdb3c8ca1e4c859e214124?v=cd6a495c-0
[HTTP/1.1 200 OK 884ms]
GEThttps://cloud.pados.hu/index.php/css/notifications/70e2-53ce-styles.css?v=db81cddf52fdb3c8ca1e4c859e214124?v=cd6a495c-0
[HTTP/1.1 200 OK 532ms]
GEThttps://cloud.pados.hu/index.php/css/core/7838-53ce-jquery.ocdialog.css?v=db81cddf52fdb3c8ca1e4c859e214124?v=cd6a495c-0
[HTTP/1.1 200 OK 627ms]
GEThttps://cloud.pados.hu/index.php/css/core/7838-53ce-results.css?v=db81cddf52fdb3c8ca1e4c859e214124?v=cd6a495c-0
[HTTP/1.1 200 OK 790ms]
GEThttps://cloud.pados.hu/index.php/css/settings/7838-53ce-settings.css?v=db81cddf52fdb3c8ca1e4c859e214124?v=cd6a495c-0
[HTTP/1.1 200 OK 1121ms]
GEThttps://cloud.pados.hu/core/vendor/core.js?v=cd6a495c-0
[HTTP/1.1 200 OK 3090ms]
GEThttps://cloud.pados.hu/index.php/js/core/merged-template-prepend.js?v=cd6a495c-0
[HTTP/1.1 200 OK 1823ms]
GEThttps://cloud.pados.hu/core/search/js/search.js?v=cd6a495c-0
[HTTP/1.1 200 OK 904ms]
GEThttps://cloud.pados.hu/apps/files_pdfviewer/js/previewplugin.js?v=cd6a495c-0
[HTTP/1.1 200 OK 940ms]
GEThttps://cloud.pados.hu/index.php/js/core/merged-share-backend.js?v=cd6a495c-0
[HTTP/1.1 200 OK 1619ms]
GEThttps://cloud.pados.hu/apps/files_videoplayer/js/viewer.js?v=cd6a495c-0
[HTTP/1.1 200 OK 989ms]
GEThttps://cloud.pados.hu/apps/firstrunwizard/js/jquery.colorbox.js?v=cd6a495c-0
[HTTP/1.1 200 OK 1458ms]
GEThttps://cloud.pados.hu/apps/firstrunwizard/js/firstrunwizard.js?v=cd6a495c-0
[HTTP/1.1 200 OK 1146ms]
GEThttps://cloud.pados.hu/apps/notifications/js/notifications.js?v=cd6a495c-0
[HTTP/1.1 200 OK 1904ms]
GEThttps://cloud.pados.hu/core/search/js/searchprovider.js?v=cd6a495c-0
[HTTP/1.1 200 OK 1525ms]
GEThttps://cloud.pados.hu/core/js/jquery-ui-fixes.js?v=cd6a495c-0
[HTTP/1.1 200 OK 1559ms]
GEThttps://cloud.pados.hu/core/js/files/fileinfo.js?v=cd6a495c-0
[HTTP/1.1 200 OK 1592ms]
GEThttps://cloud.pados.hu/core/js/files/client.js?v=cd6a495c-0
[HTTP/1.1 200 OK 2037ms]
GEThttps://cloud.pados.hu/core/js/contactsmenu.js?v=cd6a495c-0
[HTTP/1.1 200 OK 1650ms]
GEThttps://cloud.pados.hu/core/js/contactsmenu_templates.js?v=cd6a495c-0
[HTTP/1.1 200 OK 1684ms]
GEThttps://cloud.pados.hu/settings/js/settings-vue.js?v=cd6a495c-0
[HTTP/1.1 200 OK 2597ms]
GEThttps://cloud.pados.hu/index.php/css/icons/icons-vars.css?v=1545088250
[HTTP/1.1 200 OK 2325ms]
GEThttps://cloud.pados.hu/index.php/apps/theming/styles?v=0
[HTTP/1.1 200 OK 271ms]
GEThttps://cloud.pados.hu/index.php/apps/accessibility/js/accessibility?v=0
[HTTP/1.1 200 OK 249ms]
GEThttps://cloud.pados.hu/index.php/apps/theming/js/theming?v=0
[HTTP/1.1 200 OK 375ms]
GEThttps://cloud.pados.hu/apps/files/img/app.svg?v=cd6a495c
[HTTP/1.1 200 OK 283ms]
GEThttps://cloud.pados.hu/apps/activity/img/activity.svg?v=cd6a495c
[HTTP/1.1 200 OK 284ms]
GEThttps://cloud.pados.hu/apps/gallery/img/app.svg?v=cd6a495c
[HTTP/1.1 200 OK 282ms]
GEThttps://cloud.pados.hu/apps/spreed/img/app.svg?v=cd6a495c
[HTTP/1.1 200 OK 419ms]
GEThttps://cloud.pados.hu/apps/contacts/img/app.svg?v=cd6a495c
[HTTP/1.1 200 OK 487ms]
GEThttps://cloud.pados.hu/apps/calendar/img/calendar.svg?v=cd6a495c
[HTTP/1.1 200 OK 514ms]
GEThttps://cloud.pados.hu/settings/img/admin.svg?v=cd6a495c
[HTTP/1.1 200 OK 520ms]
GEThttps://cloud.pados.hu/settings/img/apps.svg?v=cd6a495c
[HTTP/1.1 200 OK 516ms]
GEThttps://cloud.pados.hu/settings/img/users.svg?v=cd6a495c
[HTTP/1.1 200 OK 523ms]
GEThttps://cloud.pados.hu/apps/firstrunwizard/img/info.svg?v=cd6a495c
[HTTP/1.1 200 OK 527ms]
GEThttps://cloud.pados.hu/settings/img/help.svg?v=cd6a495c
[HTTP/1.1 200 OK 530ms]
GEThttps://cloud.pados.hu/core/img/actions/logout.svg?v=cd6a495c
[HTTP/1.1 200 OK 550ms]
GEThttps://cloud.pados.hu/index.php/avatar/admin/32?v=0
[HTTP/1.1 201 Created 450ms]
GEThttps://cloud.pados.hu/index.php/svg/core/logo/logo?color=fff&v=1
[HTTP/1.1 200 OK 552ms]
GEThttps://cloud.pados.hu/core/fonts/Nunito-Bold.woff2
[HTTP/1.1 200 OK 247ms]
GEThttps://cloud.pados.hu/core/fonts/Nunito-Regular.woff2
[HTTP/1.1 200 OK 318ms]
JQMIGRATE: Migrate is installed, version 1.4.0 core.js:7:542
GEThttps://cloud.pados.hu/apps/notifications/img/notifications.svg
[HTTP/1.1 200 OK 34ms]
GEThttps://cloud.pados.hu/settings/js/0.js
[HTTP/1.1 200 OK 1208ms]
GEThttps://cloud.pados.hu/settings/js/3.js
[HTTP/1.1 200 OK 337ms]
GEThttps://cloud.pados.hu/settings/js/5.js
[HTTP/1.1 200 OK 244ms]
GEThttps://cloud.pados.hu/core/img/favicon-touch.png
[HTTP/1.1 200 OK 70ms]
GEThttps://cloud.pados.hu/core/img/favicon.ico
[HTTP/1.1 200 OK 312ms]
@babel/polyfill is loaded more than once on this page. This is probably not desirable/intended and may have consequences if different versions of the polyfills are applied sequentially. If you do need to load the polyfill more than once, use @babel/polyfill/noConflict instead to bypass the warning. ncvuecomponents.js:33:58705
New search handler registered search.js:67:4
GEThttps://cloud.pados.hu/index.php/avatar/pylo/32?v=0
GEThttps://cloud.pados.hu/index.php/avatar/pylo/32?v=0
[HTTP/1.1 201 Created 294ms]
Object { users: Getter & Setter, apps: Getter & Setter, settings: Getter & Setter, oc: Getter & Setter, route: Getter & Setter, … }
 
{…}
​
error: Error
​​
columnNumber: 80380
​​
config: Object { timeout: 0, xsrfCookieName: "XSRF-TOKEN", xsrfHeaderName: "X-XSRF-TOKEN", … }
​​
fileName: "https://cloud.pados.hu/settings/js/settings-vue.js?v=cd6a495c-0"
​​
lineNumber: 7
​​
message: "Request failed with status code 401"
​​
request: XMLHttpRequest { readyState: 4, timeout: 0, withCredentials: false, … }
​​
response: {…}
​​​
config: Object { timeout: 0, xsrfCookieName: "XSRF-TOKEN", xsrfHeaderName: "X-XSRF-TOKEN", … }
​​​
data: Object { ocs: {…} }
​​​
headers: Object { "cache-control": "no-cache, no-store, must-revalidate", connection: "Keep-Alive", "content-length": "77", … }
​​​
request: XMLHttpRequest { readyState: 4, timeout: 0, withCredentials: false, … }
​​​
status: 401
​​​
statusText: "Unauthorized"
​​​
<prototype>: Object { … }
​​
stack: "t.exports@https://cloud.pados.hu/settings/js/settings-vue.js?v=cd6a495c-0:7:80380\nt.exports@https://cloud.pados.hu/settings/js/settings-vue.js?v=cd6a495c-0:14:1311\nt.exports/</d[h]@https://cloud.pados.hu/settings/js/settings-vue.js?v=cd6a495c-0:7:79394\n"
​​
<prototype>: Object { … }
​
userid: "admin"
​
<prototype>: Object { … }
index.js:43:2

There were no errors during the reload, except for the warning concerning the polyfill. After the reload, the failed action added two more lines to the console. I expanded the one with the error to be able to see the details.

@skjnldsv
Copy link
Member

A bit late, my apologies :)
I will need a screenshot of your network requests.
Before you do anything, still on the development tools, there is a tab called network. Click on it and then the xhr filter. Do your action and screenshot the network log like this:
capture d ecran_2018-09-27_21-49-46

Then on the failing request (should be an error 401 according to your logs above) click on it and copy the full content of the response tab here please.

@pylorak
Copy link
Author

pylorak commented Aug 15, 2019

Hi, no prob, thanks for looking at the issue,

image

And response content was:
{"ocs":{"meta":{"status":"failure","statuscode":997,"message":""},"data":[]}}

Now running on Nextcloud 15.0.2.

@skjnldsv
Copy link
Member

skjnldsv commented Aug 15, 2019

Are you the admin? Or the sub admin?
Do you have access to your php files so we can inject some debug logs?

@pylorak
Copy link
Author

pylorak commented Aug 15, 2019

Yes, I am the admin.

@skjnldsv
Copy link
Member

Could you add (respectively) 1, 2 and 3 in the '' on the OCSException of the following lines:

throw new OCSException('', \OCP\API::RESPOND_UNAUTHORISED);

throw new OCSException('', \OCP\API::RESPOND_UNAUTHORISED);

throw new OCSException('', \OCP\API::RESPOND_UNAUTHORISED);

throw new OCSException('1', \OCP\API::RESPOND_UNAUTHORISED);

@pylorak
Copy link
Author

pylorak commented Aug 15, 2019

And then redo the screenshot and response content from above? What output should I supply after injecting these lines?

@skjnldsv
Copy link
Member

Only the output of the response tab
{"ocs":{"meta":{"status":"failure","statuscode":997,"message":""},"data":[]}}

@pylorak
Copy link
Author

pylorak commented Aug 15, 2019

Hmmm... these lines look different on my server. Let me try upgrading to the newest NC version first.

@skjnldsv
Copy link
Member

@pylorak lines could be different, but you should find the similar lines on the edituser function :)

@pylorak
Copy link
Author

pylorak commented Aug 15, 2019

I only upgraded to 15.0.10 because NC 16 requires PHP 7.1 and I only have 7.0. Upgrading PHP is a "bit" more work so NC 15 it is for now, sorry.

I think I was able to find the corresponding lines, I also crosschecked with the GitHub code-links that you pasted earlier.

The response payload now is:
{"ocs":{"meta":{"status":"failure","statuscode":997,"message":"3"},"data":[]}}

@skjnldsv
Copy link
Member

skjnldsv commented Aug 15, 2019

So, it means you're trying to change a value that you're not allowed to change.
Can you replace the 3 debug line with

throw new OCSException([$key, $permittedFields], \OCP\API::RESPOND_UNAUTHORISED);

@pylorak
Copy link
Author

pylorak commented Aug 15, 2019

Then no exception is thrown. The request succeeds but the new value is not saved. Error log says:

Error: Wrong parameters for OCP\AppFramework\OCS\OCSException([string $message [, long $code [, Throwable $previous = NULL]]]) at /data/www/pados/cloud.pados.hu/www/apps/provisioning_api/lib/Controller/UsersController.php#495

@skjnldsv
Copy link
Member

skjnldsv commented Aug 15, 2019

AH damn, sorry it is supposed to be a string.
Please use

throw new OCSException(json_encode([$key, $permittedFields]), \OCP\API::RESPOND_UNAUTHORISED);

@pylorak
Copy link
Author

pylorak commented Aug 15, 2019

{"ocs":{"meta":{"status":"failure","statuscode":997,"message":"[\"email\",[\"password\",\"language\",\"locale\",\"phone\",\"address\",\"website\",\"twitter\",\"quota\"]]"},"data":[]}}

@skjnldsv
Copy link
Member

Could you share your config.php? occ config:list

@pylorak
Copy link
Author

pylorak commented Aug 15, 2019

config.txt

@pylorak
Copy link
Author

pylorak commented Aug 15, 2019

Can it be an error in the upgrade script (or an old version of the upgrade script)? This installation used to be an old owncloud instance, which has been upgraded multiple times, then at one point it was upgraded to nextcloud, and of course has also been upgraded many times since. Maybe an upgrade script in the past forgot to add the necessary permissions for the admin user?

@skjnldsv
Copy link
Member

You have allow_user_to_change_display_name to false, therefore you cannot change the email nor displayname :)
That's why!

@kesselb
Copy link
Contributor

kesselb commented Aug 15, 2019

@skjnldsv is on fire today 👍

if ($this->config->getSystemValue('allow_user_to_change_display_name', true) !== false) {
$permittedFields[] = 'display';
$permittedFields[] = AccountManager::PROPERTY_DISPLAYNAME;
$permittedFields[] = AccountManager::PROPERTY_EMAIL;
}

/**
* ``true`` allows users to change their display names (on their Personal
* pages), and ``false`` prevents them from changing their display names.
*/
'allow_user_to_change_display_name' => true,

It's not obvious but you cannot change the email if allow_user_to_change_display_name is false.

@pylorak
Copy link
Author

pylorak commented Aug 15, 2019

Aahhh.... yeah totally not obvious, for many different reasons:

  1. I had no problem changing the e-mail address of other users as admin. I could only not set my own. Having more rights to set other users' properties than my own is some twisted logic.
  2. The setting doesn't say anything about forbidding an e-mail change, it only talks about display name.
  3. In any case, I would expect that setting only affects non-admin users. Because I expect that admin always has all privileges, that's kind of the point of being admin.

Thanks for the help. I recommend slightly changing how this setting works (see my points above why), or at least improving the documentation.

@skjnldsv
Copy link
Member

skjnldsv commented Aug 15, 2019

This is an old one from 2 years ago: #5223

Though, I think @pylorak raises interesting questions. It's not very obvious :)
I asked some questions in the 5223 pull request :)

1 & 3 are basically the same (in the code), and I totally agree on 2!

@skjnldsv
Copy link
Member

See other issues, closing to avoid duplicates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug feature: users and groups
Projects
None yet
Development

No branches or pull requests

4 participants