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

Shares "only work 1 time" #10822

Closed
3 tasks done
hugopvl opened this issue Jan 3, 2022 · 4 comments · Fixed by #10875
Closed
3 tasks done

Shares "only work 1 time" #10822

hugopvl opened this issue Jan 3, 2022 · 4 comments · Fixed by #10875
Assignees
Milestone

Comments

@hugopvl
Copy link

hugopvl commented Jan 3, 2022

Preflight Checklist

Describe the Bug

if I open the link I share for the first time, it works perfectly, asks me for the password, and opens the content.

if I then close the browser and open the link again, it no longer works:

{
  "errors": [
    {
      "message": "You don't have permission to access this.",
      "extensions": {
        "code": "FORBIDDEN"
      }
    }
  ]
}

if I clear the browser history, it works again, but only one more time and the same happens again.

the same happens if you are viewing the content and refresh your browser:

{
  "errors": [
    {
      "message": "You don't have permission to access this.",
      "extensions": {
        "code": "FORBIDDEN"
      }
    }
  ]
}

To Reproduce

create a share, and open the link, refresh the browser, or close the browser and reopen the link.

Errors Shown

{
  "errors": [
    {
      "message": "You don't have permission to access this.",
      "extensions": {
        "code": "FORBIDDEN"
      }
    }
  ]
}

What version of Directus are you using?

9.4.2

What version of Node.js are you using?

16.13.0

What database are you using?

MSSQLSERVER

What browser are you using?

chrome, firefox, edge

What operating system are you using?

macos, windows

How are you deploying Directus?

locally, debian server.

@rijkvanzanten rijkvanzanten self-assigned this Jan 3, 2022
@rijkvanzanten rijkvanzanten added this to the v9-next milestone Jan 3, 2022
@rijkvanzanten
Copy link
Member

@licitdev Did I correctly hear you say you were able to reproduce this? I can't seem to reproduce this on my end 🤔 (in Postgres nor MS SQL).

@torstenhoegel
Copy link

I got the same error on a digitalocean provisioned PaaS versioned Directus Version with an SQLite DB. @rijkvanzanten

@licitdev
Copy link
Member

licitdev commented Jan 4, 2022

@licitdev Did I correctly hear you say you were able to reproduce this? I can't seem to reproduce this on my end 🤔 (in Postgres nor MS SQL).

Yes, I was able to reproduce the issue in SQLite.

@turbolaserhawk
Copy link
Sponsor

I think I might be having the same issue. In my use case, I am sometimes seeing the shared content, and subsequently getting a permission denied, or alternately seeing null content (many different trial runs through this, experimenting). Form will display, but all content in forms is null. Playing with role permissions to attempt to resolve. Will watch for improvements in next release. Such an excellent feature!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants