RubyFlow The Ruby and Rails community linklog

×

The Ruby and Rails community linklog

Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!

Beware: Server-side APIs for Client-Side Rendering and Cross Site Scripting (XSS)

I did this mistake and I believe it’s a common scenario to consider: you have a Rails app, you need to quickly expose your resources as JSON APIs. You to the easy “#to_json” render so your Javascript SPA can do a quick Ajax fetch and, boom, your app is open to Cross Site Scripting (XSS) vulnerability. Learn about it and how to protect yourself right now

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in