Skip to content

Commit

Permalink
Evitando inyección XSS #225
Browse files Browse the repository at this point in the history
  • Loading branch information
joker-x committed Aug 15, 2013
1 parent 19b0ebf commit 567c579
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/views/campaigns/widget.js.erb
Expand Up @@ -7,7 +7,7 @@ el.setAttribute('src', '<%= url_for widget_iframe_campaign_url(:protocol => "htt
<% end %>
el.setAttribute('width', '100%');
// el height lo pasamos como un parametro, por ejemplo ?height=800
el.setAttribute('height', '<%= params[:height] ? params[:height] + "px" : "500px" %>');
el.setAttribute('height', '<%= (params[:height].to_i > 0) ? params[:height].to_i.to_s + "px" : "500px" %>');
el.setAttribute('scrolling', 'no');
el.setAttribute('frameborder', '0');
// para no tener que usar document.write, buscamos este tag de script desde el que nos llaman y nos insertamos
Expand Down

0 comments on commit 567c579

Please sign in to comment.