openpharma / clinsight

ClinSight - An application for medical monitoring within clinical trials
https://openpharma.github.io/clinsight/
Other
3 stars 0 forks source link

Use base64 encoding for usernames in http headers (shinyproxy specific) #123

Closed LDSamson closed 3 weeks ago

LDSamson commented 3 weeks ago

Closes #125. HTTP headers can only contain ascii signs, which causes issues when using names with less common names. Therefore, a solution is that user names are base64 encoded by the application serving the app (usually shinyproxy), and then decoded by clinsight once done.

jthompson-arcus commented 3 weeks ago

Not really familiar with what's going on here. Are you encoding the values into base 64 in the deployment and this PR is just decoding/checking those values?

jthompson-arcus commented 3 weeks ago

Is the first test an example of a user name that would have caused issues previously?

LDSamson commented 3 weeks ago

Yes exactly, to both of your questions. See the news description. I now ensure that all user names are base 64 encoded in shinyproxy, and then they need to be decoded in the app. This PR will do just that (decoding the user names). The provided user name in the test indeed previously caused issues.