From 757b6a1e0b135afa883dd435540e35aaf40017ad Mon Sep 17 00:00:00 2001 From: Adam Chainz Date: Fri, 8 Jan 2016 14:51:35 +0000 Subject: [PATCH] Fix bug in CSRF cookie extraction Fix a name bug from #25 / d3131d4. --- nexus/media/js/nexus.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nexus/media/js/nexus.js b/nexus/media/js/nexus.js index 5c3ac95..73c9cd2 100644 --- a/nexus/media/js/nexus.js +++ b/nexus/media/js/nexus.js @@ -34,7 +34,7 @@ jQuery.ajaxSetup({ } if (!safeMethod(settings.type) && sameOrigin(settings.url)) { - var cookieName = $('#nexus-constants').data('csrfCookieName'); + var cookieName = $('#nexus-constants').attr('data-csrf-cookie-name'); xhr.setRequestHeader("X-CSRFToken", getCookie(cookieName)); } }