-
Notifications
You must be signed in to change notification settings - Fork 442
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
Only store password in config for GitHub Enterprise (due to Enterprise limitations) #79
Only store password in config for GitHub Enterprise (due to Enterprise limitations) #79
Conversation
Current coverage is 95.27% (diff: 100%)@@ master #79 diff @@
==========================================
Files 34 34
Lines 2076 2094 +18
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 1976 1995 +19
+ Misses 100 99 -1
Partials 0 0
|
Hi @nttibbetts, gitsome should not be storing the password in the config, see 98596fa. Are you seeing otherwise? I think the docstrings could be updated and it seems I missed removing some dead code. |
Hmm, actually I think you're right, seems I missed a code path. Reviewing... |
Sadly, yes, I am still seeing this. It seems it would only happen when using gitsome for the first time and letting it create the access token for you. It seems you might have caused a regression when adding enterprise support db8e5d7 |
I think this might be a little more complicated. Enterprise doesn't seem to allow exchanging the password for a token: https://github.com/donnemartin/gitsome/blob/master/gitsome/config.py#L293-L294 I'll have to fire up my sandbox Enterprise instance and do some more testing tomorrow. |
I think the following diff might be the most straightforward way to address this issue. If you agree, could you please update the PR?
[Edit] Change summary:
|
Only tweak I would suggest is keeping the I'll make changes and throw in a couple of tests for this. |
Sounds good, thanks! |
@nttibbetts looks like you're updating the PR, please let me know when it's ready for another review. |
@donnemartin it's all set for another review. |
Nice job @nttibbetts, thanks for making the changes. Do any GitHub Enterprise users want to do a sanity test on this change? |
Tested this on GitHub Enterprise, looks good 👍 |
…e limitations) (#79) * stops storing passwords in cleartext in config
Generally not a good idea to store passwords in cleartext, even moreso when a token is generated immediately after authenticating that makes storing the password unnecessary.
Please let me know if there's anything I missed or didn't think of when removing this.