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

fix: hash usernames to avoid special character clashes #147

Merged
merged 2 commits into from
Feb 4, 2023

Conversation

RobertCraigie
Copy link
Owner

@RobertCraigie RobertCraigie commented Feb 4, 2023

This PR ensures we hash usernames instead of naively including them in the file path which can lead to issues due to special characters.

I don't think there's any value in stripping special characters as this path is not intended to be user facing and it could lead to clashes even though that is incredibly unlikely.

If you're debugging an issue relating to this directory then you can turn on debug logs to see which directory we're using.

closes #146

@codecov
Copy link

codecov bot commented Feb 4, 2023

Codecov Report

Base: 70.52% // Head: 71.62% // Increases project coverage by +1.09% 🎉

Coverage data is based on head (9cc4c17) compared to base (67b95d7).
Patch coverage: 82.60% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #147      +/-   ##
==========================================
+ Coverage   70.52%   71.62%   +1.09%     
==========================================
  Files          14       15       +1     
  Lines         648      659      +11     
==========================================
+ Hits          457      472      +15     
+ Misses        191      187       -4     
Impacted Files Coverage Δ
pyright/langserver.py 0.00% <0.00%> (ø)
pyright/_utils.py 71.42% <71.42%> (ø)
pyright/utils.py 81.39% <100.00%> (+2.67%) ⬆️
tests/test_langserver.py 100.00% <100.00%> (ø)
tests/test_main.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@RobertCraigie RobertCraigie merged commit 84dc9ac into main Feb 4, 2023
@RobertCraigie RobertCraigie deleted the fix/user-special-symbols branch February 4, 2023 12:22
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.

pyright-langserver does not start if username contains an @ symbol
1 participant