-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Fix undefined/unset scope in account properties #30588
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Joas Schilling <[email protected]>
Member
|
FWIW patching solves the problem, code works. 👍 |
CarlSchwan
approved these changes
Jan 11, 2022
blizzz
approved these changes
Jan 11, 2022
Signed-off-by: Joas Schilling <[email protected]>
Pytal
approved these changes
Jan 11, 2022
Member
|
Backports? |
Member
Author
|
/backport to stable23 |
Member
Author
|
/backport to stable22 |
Member
Author
|
/backport to stable21 |
|
The backport to stable21 failed. Please do this backport manually. |
This was referenced Jan 11, 2022
Member
Author
|
21 is unaffected |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Log
Details
{ "reqId": "6Y4E8WeiteeF6iMgH879", "level": 3, "time": "2022-01-03T17:47:34+00:00", "remoteAddr": "…", "user": "…", "app": "index", "method": "GET", "url": "/apps/files/", "message": "Invalid scope", "userAgent": "…", "version": "23.0.0.10", "exception": { "Exception": "InvalidArgumentException", "Message": "Invalid scope", "Code": 0, "Trace": [ { "file": "/srv/www/htdocs/nextcloud/lib/private/Accounts/AccountProperty.php", "line": 52, "function": "setScope", "class": "OC\\Accounts\\AccountProperty", "type": "->", "args": [ "" ] }, { "file": "/srv/www/htdocs/nextcloud/lib/private/Accounts/Account.php", "line": 55, "function": "__construct", "class": "OC\\Accounts\\AccountProperty", "type": "->", "args": [ "displayname", "…", "", "0", "" ] }, { "file": "/srv/www/htdocs/nextcloud/lib/private/Accounts/AccountManager.php", "line": 749, "function": "setProperty", "class": "OC\\Accounts\\Account", "type": "->", "args": [ "displayname", "…", "", "0" ] }, { "file": "/srv/www/htdocs/nextcloud/lib/private/Accounts/AccountManager.php", "line": 760, "function": "parseAccountData", "class": "OC\\Accounts\\AccountManager", "type": "->", "args": [ { "__class__": "OC\\User\\User" }, [ { "name": "displayname", "value": "…", "scope": "", "verified": "0" }, { "name": "address", "value": "…", "scope": "private", "verified": "0" }, { "name": "website", "value": "…", "scope": "private", "verified": "0" }, { "name": "email", "value": "…", "scope": "", "verified": "0" }, { "name": "avatar", "scope": "" }, { "name": "phone", "value": "…", "scope": "private", "verified": "0" }, { "name": "twitter", "value": "…", "scope": "private", "verified": "0" }, { "name": "organisation", "value": "", "scope": "v2-local" }, { "name": "role", "value": "", "scope": "v2-local" }, { "name": "headline", "value": "", "scope": "v2-local" }, { "name": "biography", "value": "", "scope": "v2-local" }, { "name": "profile_enabled", "value": "1" } ] ] }, { "file": "/srv/www/htdocs/nextcloud/apps/user_status/lib/Listener/BeforeTemplateRenderedListener.php", "line": 83, "function": "getAccount", "class": "OC\\Accounts\\AccountManager", "type": "->", "args": [ { "__class__": "OC\\User\\User" } ] }, { "file": "/srv/www/htdocs/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php", "line": 87, "function": "handle", "class": "OCA\\UserStatus\\Listener\\BeforeTemplateRenderedListener", "type": "->", "args": [ { "__class__": "OCP\\AppFramework\\Http\\Events\\BeforeTemplateRenderedEvent" } ] }, { "file": "/srv/www/htdocs/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php", "line": 251, "function": "__invoke", "class": "OC\\EventDispatcher\\ServiceEventListener", "type": "->", "args": [ { "__class__": "OCP\\AppFramework\\Http\\Events\\BeforeTemplateRenderedEvent" }, "OCP\\AppFramework\\Http\\Events\\BeforeTemplateRenderedEvent", { "__class__": "Symfony\\Component\\EventDispatcher\\EventDispatcher" } ] }, { "file": "/srv/www/htdocs/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php", "line": 73, "function": "callListeners", "class": "Symfony\\Component\\EventDispatcher\\EventDispatcher", "type": "->", "args": [ [ { "__class__": "Closure" }, { "__class__": "Closure" }, { "__class__": "Closure" }, { "__class__": "Closure" }, { "__class__": "Closure" }, { "__class__": "Closure" }, { "__class__": "Closure" }, { "__class__": "Closure" }, { "__class__": "Closure" }, { "__class__": "Closure" }, { "__class__": "Closure" } ], "OCP\\AppFramework\\Http\\Events\\BeforeTemplateRenderedEvent", { "__class__": "OCP\\AppFramework\\Http\\Events\\BeforeTemplateRenderedEvent" } ] }, { "file": "/srv/www/htdocs/nextcloud/lib/private/EventDispatcher/EventDispatcher.php", "line": 88, "function": "dispatch", "class": "Symfony\\Component\\EventDispatcher\\EventDispatcher", "type": "->", "args": [ { "__class__": "OCP\\AppFramework\\Http\\Events\\BeforeTemplateRenderedEvent" }, "OCP\\AppFramework\\Http\\Events\\BeforeTemplateRenderedEvent" ] }, { "file": "/srv/www/htdocs/nextcloud/lib/private/EventDispatcher/EventDispatcher.php", "line": 100, "function": "dispatch", "class": "OC\\EventDispatcher\\EventDispatcher", "type": "->", "args": [ "OCP\\AppFramework\\Http\\Events\\BeforeTemplateRenderedEvent", { "__class__": "OCP\\AppFramework\\Http\\Events\\BeforeTemplateRenderedEvent" } ] }, { "file": "/srv/www/htdocs/nextcloud/lib/private/AppFramework/Middleware/AdditionalScriptsMiddleware.php", "line": 73, "function": "dispatchTyped", "class": "OC\\EventDispatcher\\EventDispatcher", "type": "->", "args": [ { "__class__": "OCP\\AppFramework\\Http\\Events\\BeforeTemplateRenderedEvent" } ] }, { "file": "/srv/www/htdocs/nextcloud/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php", "line": 143, "function": "afterController", "class": "OC\\AppFramework\\Middleware\\AdditionalScriptsMiddleware", "type": "->", "args": [ { "__class__": "OCA\\Files\\Controller\\ViewController" }, "index", { "__class__": "OCP\\AppFramework\\Http\\TemplateResponse" } ] }, { "file": "/srv/www/htdocs/nextcloud/lib/private/AppFramework/Http/Dispatcher.php", "line": 164, "function": "afterController", "class": "OC\\AppFramework\\Middleware\\MiddlewareDispatcher", "type": "->", "args": [ { "__class__": "OCA\\Files\\Controller\\ViewController" }, "index", { "__class__": "OCP\\AppFramework\\Http\\TemplateResponse" } ] }, { "file": "/srv/www/htdocs/nextcloud/lib/private/AppFramework/App.php", "line": 157, "function": "dispatch", "class": "OC\\AppFramework\\Http\\Dispatcher", "type": "->", "args": [ { "__class__": "OCA\\Files\\Controller\\ViewController" }, "index" ] }, { "file": "/srv/www/htdocs/nextcloud/lib/private/Route/Router.php", "line": 302, "function": "main", "class": "OC\\AppFramework\\App", "type": "::", "args": [ "OCA\\Files\\Controller\\ViewController", "index", { "__class__": "OC\\AppFramework\\DependencyInjection\\DIContainer" }, { "_route": "files.view.index" } ] }, { "file": "/srv/www/htdocs/nextcloud/lib/base.php", "line": 1006, "function": "match", "class": "OC\\Route\\Router", "type": "->", "args": [ "/apps/files/" ] }, { "file": "/srv/www/htdocs/nextcloud/index.php", "line": 36, "function": "handleRequest", "class": "OC", "type": "::", "args": [] } ], "File": "/srv/www/htdocs/nextcloud/lib/private/Accounts/AccountProperty.php", "Line": 96, "CustomMessage": "--" }, "id": "61d336b80111d" }Somehow @camilasan had an empty string as scope for some of her properties.
server/lib/private/Accounts/AccountManager.php
Line 752 in 19a3656
But the code above is only fixing non-set scopes, not empty ones.
So it breaks further on as empty string is not a valid scope