[Vuejs]-Does passing data from blade to vue component is safe from hackers?

1๐Ÿ‘

โœ…

  • Can the data be changed by a user? Yes.
  • Can you stop users from changing the data? No.

Vue is JavaScript and JavaScript is ran on the client side. You have no way of stopping a user from changing code on the client side.

The best thing you can do is never trust any input that is sent back to the server. ALWAYS check if the data that has been sent to the server is valid. This is not only true for JavaScript, but any data that is being sent to your server.

๐Ÿ‘คJerodev

-1๐Ÿ‘

Yes, it is safe. The blade is rendered together , and then the data is part of the HTML/CSS/JS when rendered. And project component will be rendered into Vue HTML, so the data passed is hidden as well.

๐Ÿ‘คShuyi

Leave a comment