Comprehensive example of Cross Site Scripting(XSS) attack.Let’s say a web page has a comment section and users can leave comment on the page. A bad user leave comment on the site and it’s text is <script> alert(‘You’re hacked’) </script> It’s stored in the server database. When another user visit the page, the text is sent …
SQL query performance enhancement
We know that model querying take more time than raw sql querying. Here is some practice with sample test.In sails.js project, we use waterline ORM by default. It’s Node.js ORM but we can bind SQL dbs like MySQL, PostgreSQL. When we tried to execute query using model, it took around 2 seconds to retrieve around …
Laravel Compose
It is a method to insert code snippets to Laravel blade template. In Laravel compose we pass some variables to Laravel blade template and we receive them and compose html in blade template. For example, we can compose nav menu using it. In most sites, nav menu looks different between logged in use and logged …