Skip to content

Commit

Permalink
Fixed jquery-ujs vulnerbility issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Dev authored and Dev committed Jun 5, 2024
1 parent 83b041b commit 09381a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rails.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,9 @@
target = link.attr('target'),
csrfToken = rails.csrfToken(),
csrfParam = rails.csrfParam(),
form = $('<form method="post" action="' + href + '"></form>'),
form = $('<form method="post"></form>'),
metadataInput = '<input name="_method" value="' + method + '" type="hidden" />';

form.attr('action', href);
if (csrfParam !== undefined && csrfToken !== undefined && !rails.isCrossDomain(href)) {
metadataInput += '<input name="' + csrfParam + '" value="' + csrfToken + '" type="hidden" />';
}
Expand Down

0 comments on commit 09381a2

Please sign in to comment.