Merge pull request #1408 from drakkein/master

Strip tracking URL params
This commit is contained in:
Danny Coates 2019-10-21 10:13:56 -07:00 committed by GitHub
commit 006ee1d2e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 116 additions and 17 deletions

View file

@ -74,7 +74,9 @@ module.exports = function(state, emit) {
const password = el.value;
if (password.length > 0) {
document.getElementById('password-btn').disabled = true;
state.fileInfo.url = window.location.href;
// Strip any url parameters between fileId and secretKey
const fileInfoUrl = window.location.href.replace(/\?.+#/, '#');
state.fileInfo.url = fileInfoUrl;
state.fileInfo.password = password;
emit('getMetadata');
}