Commits

Patrick Streule  committed 3834520

ACDEV-1159: Change RegExp to strictly match the pattern

  • Participants
  • Parent commits 6d29038

Comments (0)

Files changed (1)

File lib/internal/config.js

 
         whitelistRegexp: function () {
             return this.whitelist().map(function (glob) {
-                return new RegExp(glob.replace(/\./g, '\\.').replace(/\*/g, '[^.]*'));
+                return new RegExp('^' + glob.replace(/\./g, '\\.').replace(/\*/g, '[^.]*') + '$');
             });
         }