Skip to content

Conversation

@miaulalala
Copy link
Contributor

@miaulalala miaulalala commented May 26, 2025

Broke in #52820

From sermo:

{
    "reqId": "Y8hD0xfuKQ9AbI9JCiTz",
    "level": 3,
    "time": "2025-05-26T15:42:16+00:00",
    "remoteAddr": "116.202.53.135",
    "user": "--",
    "app": "index",
    "method": "HEAD",
    "url": "/lostpassword/reset/form/dsjfjkldsfjkdsj/dsjfjkldsfjkdsj",
    "message": "Could not resolve from!",
    "userAgent": "Nextcloud Server Crawler",
    "version": "32.0.0.0",
    "exception": {
        "Exception": "OC\\AppFramework\\Utility\\QueryNotFoundException",
        "Message": "Could not resolve from!",
        "Code": 0,
        "Trace": [
            {
                "file": "/var/www/html/lib/private/ServerContainer.php",
                "line": 154,
                "function": "query",
                "class": "OC\\AppFramework\\Utility\\SimpleContainer",
                "type": "->",
                "args": [
                    "from",
                    false
                ]
            },
            {
                "file": "/var/www/html/lib/private/AppFramework/DependencyInjection/DIContainer.php",
                "line": 415,
                "function": "query",
                "class": "OC\\ServerContainer",
                "type": "->",
                "args": [
                    "from",
                    false
                ]
            },
            {
                "file": "/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php",
                "line": 74,
                "function": "query",
                "class": "OC\\AppFramework\\DependencyInjection\\DIContainer",
                "type": "->",
                "args": [
                    "from",
                    false
                ]
            },
            {
                "function": "OC\\AppFramework\\Utility\\{closure}",
                "class": "OC\\AppFramework\\Utility\\SimpleContainer",
                "type": "->",
                "args": [
                    "*** sensitive parameters replaced ***"
                ]
            },
            {
                "file": "/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php",
                "line": 61,
                "function": "array_map",
                "args": [
                    {
                        "__class__": "Closure"
                    },
                    [
                        {
                            "__class__": "ReflectionParameter",
                            "name": "appName"
                        },
                        {
                            "__class__": "ReflectionParameter",
                            "name": "request"
                        },
                        {
                            "__class__": "ReflectionParameter",
                            "name": "urlGenerator"
                        },
                        {
                            "__class__": "ReflectionParameter",
                            "name": "userManager"
                        },
                        {
                            "__class__": "ReflectionParameter",
                            "name": "defaults"
                        },
                        "And 11 more entries, set log level to debug to see all entries"
                    ]
                ]
            },
            {
                "file": "/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php",
                "line": 106,
                "function": "buildClass",
                "class": "OC\\AppFramework\\Utility\\SimpleContainer",
                "type": "->",
                "args": [
                    {
                        "__class__": "ReflectionClass",
                        "name": "OC\\Core\\Controller\\LostController"
                    }
                ]
            },
            {
                "file": "/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php",
                "line": 124,
                "function": "resolve",
                "class": "OC\\AppFramework\\Utility\\SimpleContainer",
                "type": "->",
                "args": [
                    "OC\\Core\\Controller\\LostController"
                ]
            },
            {
                "file": "/var/www/html/lib/private/AppFramework/DependencyInjection/DIContainer.php",
                "line": 438,
                "function": "query",
                "class": "OC\\AppFramework\\Utility\\SimpleContainer",
                "type": "->",
                "args": [
                    "OC\\Core\\Controller\\LostController"
                ]
            },
            {
                "file": "/var/www/html/lib/private/AppFramework/DependencyInjection/DIContainer.php",
                "line": 412,
                "function": "queryNoFallback",
                "class": "OC\\AppFramework\\DependencyInjection\\DIContainer",
                "type": "->",
                "args": [
                    "OC\\Core\\Controller\\LostController"
                ]
            },
            {
                "file": "/var/www/html/lib/private/AppFramework/App.php",
                "line": 140,
                "function": "query",
                "class": "OC\\AppFramework\\DependencyInjection\\DIContainer",
                "type": "->",
                "args": [
                    "OC\\Core\\Controller\\LostController"
                ]
            },
            {
                "file": "/var/www/html/lib/private/Route/Router.php",
                "line": 313,
                "function": "main",
                "class": "OC\\AppFramework\\App",
                "type": "::",
                "args": [
                    "OC\\Core\\Controller\\LostController",
                    "resetform",
                    {
                        "__class__": "OC\\AppFramework\\DependencyInjection\\DIContainer"
                    },
                    {
                        "token": "f1xLLnCz0Q2jAVZNGE1tP",
                        "userId": "dsjfjkldsfjkdsj",
                        "_route": "core.lost.resetform"
                    }
                ]
            },
            {
                "file": "/var/www/html/lib/base.php",
                "line": 1063,
                "function": "match",
                "class": "OC\\Route\\Router",
                "type": "->",
                "args": [
                    "/lostpassword/reset/form/dshflsdhjsdhfshjdf/dsjfjkldsfjkdsj"
                ]
            },
            {
                "file": "/var/www/html/index.php",
                "line": 25,
                "function": "handleRequest",
                "class": "OC",
                "type": "::",
                "args": []
            }
        ],
        "File": "/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php",
        "Line": 131,
        "message": "Could not resolve from!",
        "exception": {},
        "CustomMessage": "Could not resolve from!"
    }
}

Checklist

@miaulalala miaulalala self-assigned this May 26, 2025
@miaulalala miaulalala requested a review from a team as a code owner May 26, 2025 16:06
@miaulalala miaulalala added the bug label May 26, 2025
@miaulalala miaulalala requested review from icewind1991 and provokateurin and removed request for a team May 26, 2025 16:06
@miaulalala miaulalala added the 3. to review Waiting for reviews label May 26, 2025
@miaulalala miaulalala requested review from a team, SystemKeeper and sorbaugh May 26, 2025 16:06
@miaulalala miaulalala force-pushed the fix/noid/broken-password-reset-form branch from 52852ef to 4129e18 Compare May 26, 2025 17:17
@miaulalala miaulalala force-pushed the fix/noid/broken-password-reset-form branch from 4129e18 to 08f869d Compare May 26, 2025 17:22
@miaulalala miaulalala added this to the Nextcloud 32 milestone May 26, 2025
Copy link
Member

@provokateurin provokateurin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ouch, I forgot that it can mess with DI so bad 😬

@provokateurin
Copy link
Member

I had a look at the entire PR again and luckily this was the only case where it happened. Interestingly the $from field was never used in the code anyway, so that might be why rector messed this up. I should have been more thorough when checking the code though (and the reviewers too).

@miaulalala miaulalala enabled auto-merge May 27, 2025 09:46
@miaulalala miaulalala merged commit 39c63df into master May 27, 2025
192 checks passed
@miaulalala miaulalala deleted the fix/noid/broken-password-reset-form branch May 27, 2025 12:57
@skjnldsv skjnldsv mentioned this pull request Aug 19, 2025
@skjnldsv skjnldsv modified the milestones: Nextcloud 32, Nextcloud 33 Sep 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants