Software: Apache. PHP/8.1.30 uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root) Safe-mode: OFF (not secure) /home/picotech/domains/wa.picotech.app/public_html/node_modules/express-validator/src/context-items/ drwxr-xr-x |
Viewing file: Select action/file-type: "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Sanitization = void 0; const utils_1 = require("../utils"); class Sanitization { constructor(sanitizer, custom, options = [], // For testing only. // Deliberately not calling it `toString` in order to not override `Object.prototype.toString`. stringify = utils_1.toString) { this.sanitizer = sanitizer; this.custom = custom; this.options = options; this.stringify = stringify; } async run(context, value, meta) { const { path, location } = meta; const runCustomSanitizer = async () => { const sanitizerValue = this.sanitizer(value, meta); return Promise.resolve(sanitizerValue); }; if (this.custom) { const newValue = await runCustomSanitizer(); context.setData(path, newValue, location); return; } const values = Array.isArray(value) ? value : [value]; const newValues = values.map(value => { return this.sanitizer(this.stringify(value), ...this.options); }); // We get only the first value of the array if the orginal value was wrapped. context.setData(path, values !== value ? newValues[0] : newValues, location); } } exports.Sanitization = Sanitization; |
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.004 ]-- |