Guests cannot create public links
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 61
- Forks
- 34
- Avg merge
- 3d 19h
- Merged PRs (30d)
- 22
Description
How to use GitHub
- Please use the 👍 reaction to show that you are affected by the same issue.
- Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.
Steps to reproduce
- Login as guest
- Open the share dialog
- Create a public link
Expected behaviour
A link should be created
Actual behaviour
Error: OCA\Guests\Service\InviteService::sendInvite(): Argument #2 ($guest) must be of type string, null given
The fix is rather simple. In Hooks.php change:
$shareWith = $share->getSharedWith();
$isGuest = $this->guestManager->isGuest($shareWith);
to:
$shareWith = $share->getSharedWith();
if ($shareWith === null) {
return;
}
$isGuest = $this->guestManager->isGuest($shareWith);
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in Hooks.php and reproduce the issue by logging in as a guest, opening the share dialog, and creating a public link. Inspect the handling of getSharedWith() before the guest invitation call, then verify that public links are created without the null-argument error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 85/100