Skip to content

fix: path segments and query params combined - #1059

Merged
provokateurin merged 1 commit into
nextcloud:masterfrom
pReya:fix/path-segments-and-query-params
Apr 23, 2026
Merged

provokateurin merged 1 commit into
nextcloud:masterfrom
pReya:fix/path-segments-and-query-params

Conversation

@pReya

@pReya pReya commented Mar 31, 2026 •

Copy link
Copy Markdown
Contributor

closes #1058

@pReya
pReya force-pushed the fix/path-segments-and-query-params branch from 6c7b563 to c1ef96a Compare March 31, 2026 21:23
@pReya pReya mentioned this pull request Mar 31, 2026
@github-actions

Copy link
Copy Markdown

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

@provokateurin provokateurin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm not so happy about manually assembling the URL again, but I couldn't find a better solution either.

The URL could contain user and pass, so you need to take care of that as well: https://www.php.net/manual/en/function.parse-url.php#refsect1-function.parse-url-returnvalues

Comment thread lib/Controller/SiteController.php Outdated
@pReya
pReya requested a review from provokateurin April 17, 2026 09:02
@pReya

pReya commented Apr 17, 2026

Copy link
Copy Markdown
Contributor Author

I'm not so happy about manually assembling the URL again, but I couldn't find a better solution either.

The URL could contain user and pass, so you need to take care of that as well: https://www.php.net/manual/en/function.parse-url.php#refsect1-function.parse-url-returnvalues

Thanks for the review. I agree about this feeling not very elegant, but I'm afraid this is the only way to handle this. I've added user and pass parts now, too.

@pReya
pReya force-pushed the fix/path-segments-and-query-params branch from 28ec95f to 6233825 Compare April 17, 2026 09:05

@provokateurin provokateurin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@provokateurin
provokateurin enabled auto-merge April 20, 2026 07:50
@provokateurin

Copy link
Copy Markdown
Member

/backport to stable33

@provokateurin

Copy link
Copy Markdown
Member

/backport to stable32

@provokateurin

provokateurin commented Apr 20, 2026 •

Copy link
Copy Markdown
Member

You need to fix psalm. I think in this case it makes sense to throw a RuntimeException if scheme or host are not present, because it should never actually happen in reality.

Also fix missing pass and user parts in url.

Signed-off-by: Moritz St眉ckler <moritz@bitbetter.de>
auto-merge was automatically disabled April 20, 2026 08:55

Head branch was pushed to by a user without write access

@pReya
pReya force-pushed the fix/path-segments-and-query-params branch from 6233825 to 4ec7d14 Compare April 20, 2026 08:55
@pReya
pReya requested a review from provokateurin April 20, 2026 08:56

@provokateurin provokateurin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@provokateurin
provokateurin merged commit 7958b86 into nextcloud:master Apr 23, 2026
30 of 31 checks passed
@provokateurin

Copy link
Copy Markdown
Member

/backport to stable33

@provokateurin

Copy link
Copy Markdown
Member

/backport to stable32

@backportbot

backportbot Bot commented Apr 23, 2026

Copy link
Copy Markdown

The backport to stable33 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable33
git pull origin stable33

# Create the new backport branch
git checkout -b backport/1059/stable33

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick 4ec7d141

# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/1059/stable33

Error: Failed to create pull request: Validation Failed: {"resource":"PullRequest","code":"custom","message":"A pull request already exists for nextcloud:backport/1059/stable33."} - https://docs.github.com/rest/pulls/pulls#create-a-pull-request


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

@backportbot

backportbot Bot commented Apr 23, 2026

Copy link
Copy Markdown

The backport to stable32 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable32
git pull origin stable32

# Create the new backport branch
git checkout -b backport/1059/stable32

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick 4ec7d141

# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/1059/stable32

Error: Failed to create pull request: Validation Failed: {"resource":"PullRequest","code":"custom","message":"A pull request already exists for nextcloud:backport/1059/stable32."} - https://docs.github.com/rest/pulls/pulls#create-a-pull-request


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Path segments appended after query parameters corrupt the iframe URL

2 participants