Skip to content

Commit

Permalink
Fix: prevent XSS on cc change form.
Browse files Browse the repository at this point in the history
  • Loading branch information
dblock committed Oct 31, 2024
1 parent a2d94a5 commit 5deee56
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion public/subscribe.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
};

var coupon = {
code: <%= coupon ? "'#{coupon.id}'" : 'null' %>
code: "<%= coupon && coupon.id %>"
};

var subscription = {
Expand Down
6 changes: 3 additions & 3 deletions public/update_cc.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@
<script>
$(document).ready(function() {
var data = {
stripe_token: "<%= stripe_token %>",
stripe_token_type: "<%= stripe_token_type %>",
stripe_email: "<%= stripe_email %>",
stripe_token: "<%=h stripe_token %>",
stripe_token_type: "<%=h stripe_token_type %>",
stripe_email: "<%=h stripe_email %>",
team_id: "<%= team.id %>"
};

Expand Down

0 comments on commit 5deee56

Please sign in to comment.