镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

[Bug]: Loginflow v1 broken on master #51618

Closed

Description

@SystemKeeper

⚠️ This issue respects the following points: ⚠️

Bug description

13fe0f561245536be6ce440d5d62316150cc9f19 is the first bad commit
commit 13fe0f561245536be6ce440d5d62316150cc9f19
Author: Côme Chilliet <come.chilliet@nextcloud.com>
Date:   Tue Mar 11 11:31:59 2025 +0100

    fix: Clean up typing and remove deprecated calls in template functions
    
    Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>

 lib/private/Template/functions.php | 62 +++++++++++++++++++++-----------------
 1 file changed, 35 insertions(+), 27 deletions(-)

13fe0f5

Issue comes from here for login flow v1:

<input type="hidden" name="oauthState" value="<?php p($_['oauthState']) ?>" />

So the new type annotation at

function p(string $string): void {

Is the problem.

Same issue also happens when opening the server info app (and maybe other apps as well).

CC @come-nc

Activity

  1. susnux commented on Mar 21, 2025

    @susnux
    Contributor

    @come-nc maybe we should type it mixed and add a cast within that function like:

    function p(mixed $string): void {
    	print(Util::sanitizeHTML((string)$string));
    }
  2. come-nc commented on Mar 24, 2025

    @come-nc
    Contributor

    I missed that there was no soft typing before. But then it’s passed to sanitizeHTML which expects a string.

    If we remove the strong typing we should add a soft one in phpdoc, and still fix all the calls.

  3. come-nc commented on Mar 24, 2025

    @come-nc
    Contributor

    Also this means we are missing a test in CI for loginflow v1 😛

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions