-
Notifications
You must be signed in to change notification settings - Fork 59
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
fix: Handle when required resource
parameter is missing or empty
#1951
Open
joshtrichards
wants to merge
3
commits into
master
Choose a base branch
from
fix-missing-resource-issue-1888
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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: Josh <[email protected]>
joshtrichards
added
bug
Something isn't working
3. to review
backend
php
Pull requests that update Php code
labels
Nov 21, 2024
Social Run #982
Run Properties:
|
Project |
Social
|
Branch Review |
fix-missing-resource-issue-1888
|
Run status |
Errored #982
|
Run duration | 01m 07s |
Commit |
8b8ff58fb1: fix: Handle when required `resource` parameter is missing or empty
|
Committer | Josh |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
2
|
Flaky |
0
|
Pending |
0
|
Skipped |
0
|
Passing |
0
|
View all changes introduced in this branch ↗︎ |
Signed-off-by: Josh <[email protected]>
This did not help for me, the error I now get is:
|
5 tasks
Signed-off-by: Josh <[email protected]>
@paulvt Oops. Try now. :) |
Unfortunately still the same. And I see the static-psalm-analysis GitHub Action says that strings cannot be |
Though I don't see how it should ever end up truly null. It should be |
Same for me. |
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.
Exception parse_str(): Argument #1 ($string) must be of type string, null given in file '/opt/nextcloud/apps/social/lib/WellKnown/WebfingerHandler.php' line [...]
#1888Summary
resource
is a required parameter. Avoid a 500 error when it's missing or empty. Instead generate a proper 400 bad request response.Refs:
P.S. Semi-related: Our default setup checks in
server
aren't compatible withsocial
being enabled since they only check for 200 or 404 (neither of which are applicable whensocial
is enabled and when querying/.well-known/webfinger
without any parameterst):https://github.com/nextcloud/server/blob/16812837157395c078a9689cd51530a6382e17d2/apps/settings/lib/SetupChecks/WellKnownUrls.php#L48
This PR doesn't impact those either way directly (since the prior 500 nor the 400 added via this PR would have ever passed). I'll try to take a closer look at those over in
server
. EDIT: nextcloud/server#49440