WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@wlupton
Copy link

@wlupton wlupton commented Feb 26, 2021

Also prevent repr() from including the password.

Comment on lines +58 to +59
return "<CrowdServer('%s', '%s', '********')>" % \
(self.crowd_url, self.app_name)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think instead of a static string, we can maybe mask the password string matching it's length?

I know this gives away the length of the password but that could still be useful for users to know which password was used to configure the server.

Suggested change
return "<CrowdServer('%s', '%s', '********')>" % \
(self.crowd_url, self.app_name)
return "<CrowdServer('%s', '%s', '%s')>" % (
self.crowd_url, self.app_name, '*' * len(self.app_pass))

Optionally, we could add a private method that returns the raw password (probably out of scope for this 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

Successfully merging this pull request may close these issues.

2 participants