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

is this too much information for end-user? #2246

Closed
jubilee2 opened this issue Aug 12, 2022 · 5 comments · Fixed by #2275
Closed

is this too much information for end-user? #2246

jubilee2 opened this issue Aug 12, 2022 · 5 comments · Fixed by #2275

Comments

@jubilee2
Copy link
Contributor

jubilee2 commented Aug 12, 2022

super("Not allowed to perform #{action.inspect} on #{resource.inspect}")

image

@pablobm
Copy link
Collaborator

pablobm commented Aug 15, 2022

Perhaps. In which circumstance do you see that error? I would think you should not see it if you use the provided interface, and it would only appear if you forged a request.

@jubilee2
Copy link
Contributor Author

Yes out of the provided interface.

@jubilee2 jubilee2 closed this as not planned Won't fix, can't repro, duplicate, stale Sep 11, 2022
@pablobm
Copy link
Collaborator

pablobm commented Sep 29, 2022

This issue may actually have merit. The question is: would this reveal information useful to an attacker? For example, by doing this an attacker would be able to see details about what attributes are available for models. That would not be so good.

Perhaps we should give less information?

@pablobm pablobm reopened this Sep 29, 2022
@jubilee2
Copy link
Contributor Author

jubilee2 commented Sep 30, 2022

we might need think about I18n for message later

how about this?

      case resource
      when String, Symbol
        super("Not allowed to perform #{action.inspect} on #{resource.inspect}")
      when Module
        super("Not allowed to perform #{action.inspect} on #{resource.name}")
      else
        super(
          "Not allowed to perform #{action.inspect} on the given " +
            resource.class.name
        )
      end

@jubilee2
Copy link
Contributor Author

jubilee2 commented Oct 7, 2022

Thank you!

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

Successfully merging a pull request may close this issue.

2 participants