Skip to content
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: prevent null token #328

Merged
merged 1 commit into from
Aug 2, 2024
Merged

fix: prevent null token #328

merged 1 commit into from
Aug 2, 2024

Conversation

skjnldsv
Copy link
Member

@skjnldsv skjnldsv commented Jul 30, 2024

I have no clue how that can happen, because we clearly have the token in the URL, but 🤷

{
  "reqId": "geRGVLc8I4Nvg8yDzXL6",
  "level": 3,
  "time": "2024-07-22T09:10:34+00:00",
  "remoteAddr": "<IP>",
  "user": "--",
  "app": "index",
  "method": "GET",
  "url": "/s/<share_token>/download?path=OBFUSCATED.pdf.pdf",
  "message": "OCA\\Files_DownloadLimit\\Db\\LimitMapper::get(): Argument #1 ($token) must be of type string, null given, called in /var/www/html/apps/files_downloadlimit/lib/Listener/ShareLinkAccessedListener.php on line 59 in file '/var/www/html/apps/files_downloadlimit/lib/Db/LimitMapper.php' line 37",
  "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101 Firefox/128.0",
  "version": "29.0.3.4",
  "exception": {
    "Exception": "Exception",
    "Message": "OCA\\Files_DownloadLimit\\Db\\LimitMapper::get(): Argument #1 ($token) must be of type string, null given, called in /var/www/html/apps/files_downloadlimit/lib/Listener/ShareLinkAccessedListener.php on line 59 in file '/var/www/html/apps/files_downloadlimit/lib/Db/LimitMapper.php' line 37",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/html/lib/private/AppFramework/App.php",
        "line": 184,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          [
            "OCA\\Files_Sharing\\Controller\\ShareController"
          ],
          "downloadShare"
        ]
      },

@skjnldsv skjnldsv added bug Something isn't working 3. to review Waiting for reviews labels Jul 30, 2024
@skjnldsv skjnldsv self-assigned this Jul 30, 2024
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
@skjnldsv skjnldsv merged commit 28b1cf7 into master Aug 2, 2024
22 checks passed
@skjnldsv skjnldsv deleted the fix/null-token branch August 2, 2024 13:02
@AndyScherzinger AndyScherzinger added this to the Nextcloud 30 milestone Aug 2, 2024
@Antreesy

This comment was marked as resolved.

@susnux

This comment was marked as resolved.

1 similar comment
@skjnldsv
Copy link
Member Author

skjnldsv commented Aug 5, 2024

/backport to stable29

@backportbot backportbot bot added the backport-request Pending backport by the backport-bot label Aug 5, 2024
@backportbot backportbot bot removed the backport-request Pending backport by the backport-bot label Aug 5, 2024
@skjnldsv
Copy link
Member Author

skjnldsv commented Aug 5, 2024

/backport to stable28

@backportbot backportbot bot added the backport-request Pending backport by the backport-bot label Aug 5, 2024
@backportbot backportbot bot mentioned this pull request Aug 5, 2024
2 tasks
@backportbot backportbot bot removed the backport-request Pending backport by the backport-bot label Aug 5, 2024
@Antreesy
Copy link

Antreesy commented Aug 5, 2024

Third time's the charm 😁
Thanks!

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 Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants