From 222e1334bf29605925eefa45ff107ca1155e93c0 Mon Sep 17 00:00:00 2001 From: Camilo Nova Date: Tue, 28 Jun 2016 11:51:51 -0500 Subject: [PATCH] Used strict comparison in docs/ref/csrf.txt's JavaScript. --- docs/ref/csrf.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/ref/csrf.txt b/docs/ref/csrf.txt index 7baf83f2e5..2c1b8abbf5 100644 --- a/docs/ref/csrf.txt +++ b/docs/ref/csrf.txt @@ -83,12 +83,12 @@ Acquiring the token is straightforward: // using jQuery function getCookie(name) { var cookieValue = null; - if (document.cookie && document.cookie != '') { + if (document.cookie && document.cookie !== '') { var cookies = document.cookie.split(';'); for (var i = 0; i < cookies.length; i++) { var cookie = jQuery.trim(cookies[i]); // Does this cookie string begin with the name we want? - if (cookie.substring(0, name.length + 1) == (name + '=')) { + if (cookie.substring(0, name.length + 1) === (name + '=')) { cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); break; }