Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Show jdbc password via status only in dev mode #578

Merged
merged 1 commit into from

4 participants

@rmath

Hi,

This pull request just check the current app mode and hide the DB password according to it.
I wrote it for obvious security reasons.

@Notalifeform
Collaborator

can you add a lighthouse ticket?

@pepite
Owner
@pepite pepite merged commit 97de0cb into from
@mathieuancelin

Thank you very much Nicolas :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 6, 2013
  1. @rmath
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 1 deletion.
  1. +3 −1 framework/src/play/db/DBConfig.java
View
4 framework/src/play/db/DBConfig.java
@@ -311,7 +311,9 @@ protected String getStatus() {
out.println("Jdbc url: " + ds.getJdbcUrl());
out.println("Jdbc driver: " + ds.getDriverClass());
out.println("Jdbc user: " + ds.getUser());
- out.println("Jdbc password: " + ds.getPassword());
+ if (Play.mode.isDev()) {
+ out.println("Jdbc password: " + ds.getPassword());
+ }
out.println("Min pool size: " + ds.getMinPoolSize());
out.println("Max pool size: " + ds.getMaxPoolSize());
out.println("Initial pool size: " + ds.getInitialPoolSize());
Something went wrong with that request. Please try again.