Ignore:
Timestamp:
12/12/24 17:06:06 (5 weeks ago)
Author:
stefan toskovski <stefantoska84@…>
Branches:
main
Parents:
d565449
Message:

Pred finalna verzija

Location:
imaps-frontend/node_modules/cross-spawn/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • imaps-frontend/node_modules/cross-spawn/lib/enoent.js

    rd565449 r0c6b92a  
    2525        // See https://github.com/IndigoUnited/node-cross-spawn/issues/16
    2626        if (name === 'exit') {
    27             const err = verifyENOENT(arg1, parsed, 'spawn');
     27            const err = verifyENOENT(arg1, parsed);
    2828
    2929            if (err) {
  • imaps-frontend/node_modules/cross-spawn/lib/util/escape.js

    rd565449 r0c6b92a  
    1616
    1717    // Algorithm below is based on https://qntm.org/cmd
     18    // It's slightly altered to disable JS backtracking to avoid hanging on specially crafted input
     19    // Please see https://github.com/moxystudio/node-cross-spawn/pull/160 for more information
    1820
    1921    // Sequence of backslashes followed by a double quote:
    2022    // double up all the backslashes and escape the double quote
    21     arg = arg.replace(/(\\*)"/g, '$1$1\\"');
     23    arg = arg.replace(/(?=(\\+?)?)\1"/g, '$1$1\\"');
    2224
    2325    // Sequence of backslashes followed by the end of the string
    2426    // (which will become a double quote later):
    2527    // double up all the backslashes
    26     arg = arg.replace(/(\\*)$/, '$1$1');
     28    arg = arg.replace(/(?=(\\+?)?)\1$/, '$1$1');
    2729
    2830    // All other backslashes occur literally
Note: See TracChangeset for help on using the changeset viewer.