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

Location returned from POST to /postgrest/users inaccessible #259

Closed
ssoriche opened this issue Aug 10, 2015 · 3 comments
Closed

Location returned from POST to /postgrest/users inaccessible #259

ssoriche opened this issue Aug 10, 2015 · 3 comments

Comments

@ssoriche
Copy link

After creating a new user with a POST to /postgrest/users, the Location header:

/postgrest/users?id=eq.jdoe

Is returned, however performing a GET request on this location returns a 404 even when authenticated as the user the record is created for.

Looking at the Postgres log while the GET request is performed results in:

LOG:  execute 0: select id, pass, rolname from postgrest.auth where id = $1
DETAIL:  parameters: $1 = 'jdoe'
LOG:  execute 1: set user_vars.user_id = 'jdoe'
LOG:  execute 2: set role 'unverified'
LOG:  execute 3: reset role
LOG:  execute 4: reset user_vars.user_id

Querying the auth table with the appropriate role via psql returns results.

If the location is returned should it not be accessible? PostgREST should filter out the rolname and password, but other details should be returned.

@begriffs
Copy link
Member

Is unverified the role you chose for anonymous requests (the --anonymous command line flag)?

@ssoriche
Copy link
Author

No, unverified is the role for a user that has already been created and has credentials. I've tried querying with the anon role too, nothing returned (which is what I expect).

@begriffs
Copy link
Member

User management is being removed from v0.3.

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

No branches or pull requests

2 participants