Strip tracking url parameters

This commit is contained in:
Wiktor Furman 2019-10-15 15:29:48 +02:00
parent 0daa03e04c
commit 114068c531
4 changed files with 40 additions and 11 deletions

View file

@ -72,7 +72,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');
}