hof 19.14.3 → 19.14.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -20,7 +20,7 @@ const defaults = {
20
20
  host: process.env.HOST || '0.0.0.0',
21
21
  port: process.env.PORT || '8080',
22
22
  env: process.env.NODE_ENV || 'development',
23
- gaTagId: process.env.GA_TAG,
23
+ gaTagId: process.env.GA_TAG || 'Test-GA-Tag',
24
24
  ga4TagId: process.env.GA_4_TAG,
25
25
  gaCrossDomainTrackingTagId: process.env.GDS_CROSS_DOMAIN_GA_TAG,
26
26
  loglevel: process.env.LOG_LEVEL || 'info',
@@ -13,7 +13,7 @@ const sanitisationBlacklistArray = {
13
13
  '&&': { regex: '&&+', replace: '&' },
14
14
  '@@': { regex: '@@+', replace: '@' },
15
15
  '/..;/': { regex: '/\\.\\.;/', replace: '-' }, // Purposely input before ".." as they conflict
16
- '..': { regex: '\\.\\.+', replace: '.' },
16
+ // '..': { regex: '\\.\\.+', replace: '.' }, // Agreed to disable this rule for now unless its specifically required
17
17
  '/etc/passwd': { regex: '\/etc\/passwd', replace: '-' },
18
18
  'c:\\': { regex: 'c:\\\\', replace: '-' },
19
19
  'cmd.exe': { regex: 'cmd\\.exe', replace: '-' },
@@ -22,8 +22,8 @@ const sanitisationBlacklistArray = {
22
22
  '[': { regex: '\\[+', replace: '[-' },
23
23
  ']': { regex: '\\]+', replace: ']-' },
24
24
  '~': { regex: '~', replace: '~-' },
25
- '&#': { regex: '&#', replace: '&#-' },
26
- '%U': { regex: '%U', replace: '%U-' }
25
+ '&#': { regex: '&#', replace: '-' },
26
+ '%U': { regex: '%U', replace: '-' }
27
27
  };
28
28
 
29
29
  module.exports = sanitisationBlacklistArray;
@@ -1,6 +1,7 @@
1
1
 
2
2
  const moment = require('moment');
3
3
  const redis = require('redis');
4
+ const config = require('./../config/hof-defaults');
4
5
 
5
6
  module.exports = (options, rateLimitType) => {
6
7
  const logger = options.logger || { log: (func, msg) => console[func](msg) };
@@ -14,7 +15,7 @@ module.exports = (options, rateLimitType) => {
14
15
  const ERROR_CODE = rateLimits.errCode;
15
16
 
16
17
  return async (req, res, next) => {
17
- const redisClient = redis.createClient();
18
+ const redisClient = redis.createClient(config.redis);
18
19
 
19
20
  // check that redis client exists
20
21
  if (!redisClient) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hof",
3
3
  "description": "A bootstrap for HOF projects",
4
- "version": "19.14.3",
4
+ "version": "19.14.7",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
7
7
  "author": "HomeOffice",