diff --git a/src/wappalyzer.js b/src/wappalyzer.js index b36e6fb2e..60a4f6e60 100644 --- a/src/wappalyzer.js +++ b/src/wappalyzer.js @@ -629,10 +629,10 @@ class Wappalyzer { Object.keys(patterns).forEach((cookieName) => { if (typeof patterns[cookieName] !== 'function') { - cookieName = cookieName.toLowerCase(); + const cookieNameLower = cookieName.toLowerCase(); promises.push(asyncForEach(patterns[cookieName], (pattern) => { - const cookie = cookies.find(_cookie => _cookie.name.toLowerCase() === cookieName); + const cookie = cookies.find(_cookie => _cookie.name.toLowerCase() === cookieNameLower); if (cookie && pattern.regex.test(cookie.value)) { addDetected(app, pattern, 'cookies', cookie.value, cookieName); diff --git a/src/wappalyzer.spec.js b/src/wappalyzer.spec.js index b844b716d..ea68c22e0 100644 --- a/src/wappalyzer.spec.js +++ b/src/wappalyzer.spec.js @@ -12,6 +12,11 @@ const appsJson = { test: 'test', }, }, + appUppercaseCookies: { + cookies: { + Test: 'Test', + }, + }, appHeaders: { headers: { 'X-Powered-By': 'test', @@ -111,6 +116,10 @@ describe('Wappalyzer', () => { expect(apps).to.have.any.keys('appCookies'); }); + it('should identify technologies using uppercase named cookies', () => { + expect(apps).to.have.any.keys('appUppercaseCookies'); + }); + it('should identify technologies using JavaScript', () => { expect(apps).to.have.any.keys('appJs'); });