Skip to content
Advertisement

Form body in a POST ending up as URL params?

Our stack:

  • Vue.js frontend using vuetify component lib
  • custom python middleware rest api using flask + tornado
  • matomo running externally and connected to the frontend using vues plugin system.(https://github.com/AmazingDreams/vue-matomo)

We recently added matamo to our site and very very rarely we’ve noticed 4 incidents out of thousands of users where the username/password which is submitted via POST request to our middleware is ending up being logged in matomo as https://somesite.com?username=someUser&password=somePassword.

Strangely enough the actual route to login is at somesite.com/login so its weird matamo sees it on the homepage.

Here’s the code we use for logging users in:

auth.js

JavaScript

login form

JavaScript

submit method

JavaScript

Any ides on why this might be happening?

Advertisement

Answer

We ended up resolving this by adding the method="POST" attr to <v-form>. turned out in some rare cases the form would try to submit as GET which resulted in the form params ending up in the URL as URL params.

JavaScript
Advertisement