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

bindpw displayed on defalt error template if a 500 error is caught and show_errors is enabled. #5

Open
whosgonna opened this issue Sep 16, 2017 · 2 comments

Comments

@whosgonna
Copy link

If using D2PAEP::LDAP, and show_errors is enabled in D2 (for example, if using the 'development' environment), the bindpw is displayed on the error page if a 500 error occurs. Other passwords from the config file will show "'Hidden (looks potentially sensitive)',".

It looks like D2 uses the following to determine if it should hide the password:
elsif ( $key =~ /(pass|card?num|pan|secret)/i )

Note that this occurs not because D2 is dumping the object, but because it is dumping the information from the configuration file(s).

I can submit a PR for this if you like. My thought is that the best solution is:

  1. Create a new attribute of 'bindpass'.
  2. Change bindpw to lazy build (just make it $self->bindpass)

I think this will allow bindpass to gracefully replace bindpw (that is to say, it won't break backwards compatibility.

I will probably open a ticket against Dancer2, asking for 'bindpw' to be added to that list as well.

Let me know your thoughts. Thank you.

@racke
Copy link
Member

racke commented Sep 16, 2017

I suggest that we add a method to Dancer2, which allows plugins to extend this list of censored words.

@whosgonna
Copy link
Author

Thank you. I opened an issue against Dancer2, and submitted a PR for it there. I made a quick fix for this one as well, but i should update the POD and maybe add a test here before submitting a PR.

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

No branches or pull requests

2 participants