From 0b8549c63cab3338688585ade71fe5de1d46a254 Mon Sep 17 00:00:00 2001 From: Pablinux Date: Sun, 25 May 2025 12:10:15 -0500 Subject: [PATCH] Agregado toping en los menus --- README.md | 7 + node_modules/body-parser/HISTORY.md | 7 + node_modules/body-parser/README.md | 11 + .../body-parser/lib/types/urlencoded.js | 37 +- node_modules/body-parser/package.json | 4 +- node_modules/cookie/HISTORY.md | 147 -- node_modules/cookie/index.js | 174 +- node_modules/cookie/package.json | 6 +- node_modules/encodeurl/HISTORY.md | 14 - node_modules/encodeurl/README.md | 57 +- node_modules/encodeurl/index.js | 2 +- node_modules/encodeurl/package.json | 14 +- node_modules/express/History.md | 41 + node_modules/express/Readme.md | 106 +- node_modules/express/lib/response.js | 21 +- node_modules/express/package.json | 28 +- node_modules/finalhandler/HISTORY.md | 15 + node_modules/finalhandler/README.md | 4 +- node_modules/finalhandler/index.js | 9 +- node_modules/finalhandler/package.json | 15 +- node_modules/merge-descriptors/README.md | 7 +- node_modules/merge-descriptors/index.js | 6 +- node_modules/merge-descriptors/package.json | 21 +- node_modules/path-to-regexp/History.md | 36 - node_modules/path-to-regexp/index.js | 109 +- node_modules/path-to-regexp/package.json | 4 +- node_modules/qs/.editorconfig | 3 + node_modules/qs/.eslintrc | 4 +- node_modules/qs/CHANGELOG.md | 64 +- node_modules/qs/README.md | 182 +- node_modules/qs/dist/qs.js | 2076 +---------------- node_modules/qs/lib/parse.js | 59 +- node_modules/qs/lib/stringify.js | 81 +- node_modules/qs/lib/utils.js | 85 +- node_modules/qs/package.json | 38 +- node_modules/qs/test/parse.js | 385 ++- node_modules/qs/test/stringify.js | 483 +++- node_modules/send/HISTORY.md | 5 + node_modules/send/index.js | 3 +- node_modules/send/package.json | 2 +- node_modules/serve-static/HISTORY.md | 16 + node_modules/serve-static/index.js | 3 +- node_modules/serve-static/package.json | 6 +- package-lock.json | 1579 +++++++++++-- package.json | 25 +- src/config.js | 9 +- src/controladores/controlador_Clientes.js | 104 +- src/controladores/controlador_General.js | 2 +- src/controladores/controlador_Items.js | 15 +- src/public/css/restaurant_dashMesero.css | 4 +- src/public/img/usuario-icon.png | Bin 0 -> 12056 bytes src/public/js/app_restaurant_detallePed.js | 14 +- src/views/app_restaurant.ejs | 2 +- 53 files changed, 3235 insertions(+), 2916 deletions(-) delete mode 100644 node_modules/cookie/HISTORY.md delete mode 100644 node_modules/encodeurl/HISTORY.md delete mode 100644 node_modules/path-to-regexp/History.md create mode 100644 src/public/img/usuario-icon.png diff --git a/README.md b/README.md index 2686499..23e54b3 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,13 @@ los iconos se usado son de font awesome buscar iconos (https://fontawesome.com/search) +## compilacion de proyecto +npm install pkg --save +npm run build-win +npm run build-linux +npm run build-mac +reemplazar axios por node fetch.. ya que causa problemas con pkg: +npm install node-fetch@2 ## Autores | [![](https://avatars.githubusercontent.com/u/27124364?s=96&v=4)]([https://github.com/telcotronics](https://github.com/telcotronics)) diff --git a/node_modules/body-parser/HISTORY.md b/node_modules/body-parser/HISTORY.md index b892491..81d23e0 100644 --- a/node_modules/body-parser/HISTORY.md +++ b/node_modules/body-parser/HISTORY.md @@ -1,3 +1,10 @@ +1.20.3 / 2024-09-10 +=================== + + * deps: qs@6.13.0 + * add `depth` option to customize the depth level in the parser + * IMPORTANT: The default `depth` level for parsing URL-encoded data is now `32` (previously was `Infinity`) + 1.20.2 / 2023-02-21 =================== diff --git a/node_modules/body-parser/README.md b/node_modules/body-parser/README.md index 38553bf..f6661b7 100644 --- a/node_modules/body-parser/README.md +++ b/node_modules/body-parser/README.md @@ -4,6 +4,7 @@ [![NPM Downloads][npm-downloads-image]][npm-url] [![Build Status][ci-image]][ci-url] [![Test Coverage][coveralls-image]][coveralls-url] +[![OpenSSF Scorecard Badge][ossf-scorecard-badge]][ossf-scorecard-visualizer] Node.js body parsing middleware. @@ -277,6 +278,10 @@ The `verify` option, if supplied, is called as `verify(req, res, buf, encoding)` where `buf` is a `Buffer` of the raw request body and `encoding` is the encoding of the request. The parsing can be aborted by throwing an error. +#### depth + +The `depth` option is used to configure the maximum depth of the `qs` library when `extended` is `true`. This allows you to limit the amount of keys that are parsed and can be useful to prevent certain types of abuse. Defaults to `32`. It is recommended to keep this value as low as possible. + ## Errors The middlewares provided by this module create errors using the @@ -373,6 +378,10 @@ as well as in the `encoding` property. The `status` property is set to `415`, the `type` property is set to `'encoding.unsupported'`, and the `encoding` property is set to the encoding that is unsupported. +### The input exceeded the depth + +This error occurs when using `bodyParser.urlencoded` with the `extended` property set to `true` and the input exceeds the configured `depth` option. The `status` property is set to `400`. It is recommended to review the `depth` option and evaluate if it requires a higher value. When the `depth` option is set to `32` (default value), the error will not be thrown. + ## Examples ### Express/Connect top-level generic @@ -463,3 +472,5 @@ app.use(bodyParser.text({ type: 'text/html' })) [npm-downloads-image]: https://badgen.net/npm/dm/body-parser [npm-url]: https://npmjs.org/package/body-parser [npm-version-image]: https://badgen.net/npm/v/body-parser +[ossf-scorecard-badge]: https://api.scorecard.dev/projects/github.com/expressjs/body-parser/badge +[ossf-scorecard-visualizer]: https://ossf.github.io/scorecard-visualizer/#/projects/github.com/expressjs/body-parser \ No newline at end of file diff --git a/node_modules/body-parser/lib/types/urlencoded.js b/node_modules/body-parser/lib/types/urlencoded.js index b2ca8f1..2bd4485 100644 --- a/node_modules/body-parser/lib/types/urlencoded.js +++ b/node_modules/body-parser/lib/types/urlencoded.js @@ -55,6 +55,9 @@ function urlencoded (options) { : opts.limit var type = opts.type || 'application/x-www-form-urlencoded' var verify = opts.verify || false + var depth = typeof opts.depth !== 'number' + ? Number(opts.depth || 32) + : opts.depth if (verify !== false && typeof verify !== 'function') { throw new TypeError('option verify must be function') @@ -118,7 +121,8 @@ function urlencoded (options) { encoding: charset, inflate: inflate, limit: limit, - verify: verify + verify: verify, + depth: depth }) } } @@ -133,12 +137,20 @@ function extendedparser (options) { var parameterLimit = options.parameterLimit !== undefined ? options.parameterLimit : 1000 + + var depth = typeof options.depth !== 'number' + ? Number(options.depth || 32) + : options.depth var parse = parser('qs') if (isNaN(parameterLimit) || parameterLimit < 1) { throw new TypeError('option parameterLimit must be a positive number') } + if (isNaN(depth) || depth < 0) { + throw new TypeError('option depth must be a zero or a positive number') + } + if (isFinite(parameterLimit)) { parameterLimit = parameterLimit | 0 } @@ -156,12 +168,23 @@ function extendedparser (options) { var arrayLimit = Math.max(100, paramCount) debug('parse extended urlencoding') - return parse(body, { - allowPrototypes: true, - arrayLimit: arrayLimit, - depth: Infinity, - parameterLimit: parameterLimit - }) + try { + return parse(body, { + allowPrototypes: true, + arrayLimit: arrayLimit, + depth: depth, + strictDepth: true, + parameterLimit: parameterLimit + }) + } catch (err) { + if (err instanceof RangeError) { + throw createError(400, 'The input exceeded the depth', { + type: 'querystring.parse.rangeError' + }) + } else { + throw err + } + } } } diff --git a/node_modules/body-parser/package.json b/node_modules/body-parser/package.json index 4637304..3c9926f 100644 --- a/node_modules/body-parser/package.json +++ b/node_modules/body-parser/package.json @@ -1,7 +1,7 @@ { "name": "body-parser", "description": "Node.js body parsing middleware", - "version": "1.20.2", + "version": "1.20.3", "contributors": [ "Douglas Christopher Wilson ", "Jonathan Ong (http://jongleberry.com)" @@ -17,7 +17,7 @@ "http-errors": "2.0.0", "iconv-lite": "0.4.24", "on-finished": "2.4.1", - "qs": "6.11.0", + "qs": "6.13.0", "raw-body": "2.5.2", "type-is": "~1.6.18", "unpipe": "1.0.0" diff --git a/node_modules/cookie/HISTORY.md b/node_modules/cookie/HISTORY.md deleted file mode 100644 index 41ae4b0..0000000 --- a/node_modules/cookie/HISTORY.md +++ /dev/null @@ -1,147 +0,0 @@ -0.6.0 / 2023-11-06 -================== - - * Add `partitioned` option - -0.5.0 / 2022-04-11 -================== - - * Add `priority` option - * Fix `expires` option to reject invalid dates - * perf: improve default decode speed - * perf: remove slow string split in parse - -0.4.2 / 2022-02-02 -================== - - * perf: read value only when assigning in parse - * perf: remove unnecessary regexp in parse - -0.4.1 / 2020-04-21 -================== - - * Fix `maxAge` option to reject invalid values - -0.4.0 / 2019-05-15 -================== - - * Add `SameSite=None` support - -0.3.1 / 2016-05-26 -================== - - * Fix `sameSite: true` to work with draft-7 clients - - `true` now sends `SameSite=Strict` instead of `SameSite` - -0.3.0 / 2016-05-26 -================== - - * Add `sameSite` option - - Replaces `firstPartyOnly` option, never implemented by browsers - * Improve error message when `encode` is not a function - * Improve error message when `expires` is not a `Date` - -0.2.4 / 2016-05-20 -================== - - * perf: enable strict mode - * perf: use for loop in parse - * perf: use string concatenation for serialization - -0.2.3 / 2015-10-25 -================== - - * Fix cookie `Max-Age` to never be a floating point number - -0.2.2 / 2015-09-17 -================== - - * Fix regression when setting empty cookie value - - Ease the new restriction, which is just basic header-level validation - * Fix typo in invalid value errors - -0.2.1 / 2015-09-17 -================== - - * Throw on invalid values provided to `serialize` - - Ensures the resulting string is a valid HTTP header value - -0.2.0 / 2015-08-13 -================== - - * Add `firstPartyOnly` option - * Throw better error for invalid argument to parse - * perf: hoist regular expression - -0.1.5 / 2015-09-17 -================== - - * Fix regression when setting empty cookie value - - Ease the new restriction, which is just basic header-level validation - * Fix typo in invalid value errors - -0.1.4 / 2015-09-17 -================== - - * Throw better error for invalid argument to parse - * Throw on invalid values provided to `serialize` - - Ensures the resulting string is a valid HTTP header value - -0.1.3 / 2015-05-19 -================== - - * Reduce the scope of try-catch deopt - * Remove argument reassignments - -0.1.2 / 2014-04-16 -================== - - * Remove unnecessary files from npm package - -0.1.1 / 2014-02-23 -================== - - * Fix bad parse when cookie value contained a comma - * Fix support for `maxAge` of `0` - -0.1.0 / 2013-05-01 -================== - - * Add `decode` option - * Add `encode` option - -0.0.6 / 2013-04-08 -================== - - * Ignore cookie parts missing `=` - -0.0.5 / 2012-10-29 -================== - - * Return raw cookie value if value unescape errors - -0.0.4 / 2012-06-21 -================== - - * Use encode/decodeURIComponent for cookie encoding/decoding - - Improve server/client interoperability - -0.0.3 / 2012-06-06 -================== - - * Only escape special characters per the cookie RFC - -0.0.2 / 2012-06-01 -================== - - * Fix `maxAge` option to not throw error - -0.0.1 / 2012-05-28 -================== - - * Add more tests - -0.0.0 / 2012-05-28 -================== - - * Initial release diff --git a/node_modules/cookie/index.js b/node_modules/cookie/index.js index 03d4c38..51a58cb 100644 --- a/node_modules/cookie/index.js +++ b/node_modules/cookie/index.js @@ -23,14 +23,66 @@ exports.serialize = serialize; var __toString = Object.prototype.toString /** - * RegExp to match field-content in RFC 7230 sec 3.2 + * RegExp to match cookie-name in RFC 6265 sec 4.1.1 + * This refers out to the obsoleted definition of token in RFC 2616 sec 2.2 + * which has been replaced by the token definition in RFC 7230 appendix B. * - * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ] - * field-vchar = VCHAR / obs-text - * obs-text = %x80-FF + * cookie-name = token + * token = 1*tchar + * tchar = "!" / "#" / "$" / "%" / "&" / "'" / + * "*" / "+" / "-" / "." / "^" / "_" / + * "`" / "|" / "~" / DIGIT / ALPHA */ -var fieldContentRegExp = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/; +var cookieNameRegExp = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/; + +/** + * RegExp to match cookie-value in RFC 6265 sec 4.1.1 + * + * cookie-value = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE ) + * cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E + * ; US-ASCII characters excluding CTLs, + * ; whitespace DQUOTE, comma, semicolon, + * ; and backslash + */ + +var cookieValueRegExp = /^("?)[\u0021\u0023-\u002B\u002D-\u003A\u003C-\u005B\u005D-\u007E]*\1$/; + +/** + * RegExp to match domain-value in RFC 6265 sec 4.1.1 + * + * domain-value = + * ; defined in [RFC1034], Section 3.5, as + * ; enhanced by [RFC1123], Section 2.1 + * =