mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-27 20:56:12 +01:00
🧮 refactor: Replace Eval with Safe Math Expression Parser (#11098)
* chore: Add mathjs dependency * refactor: Replace eval with mathjs for safer expression evaluation and improve session expiry handling to not environment variables from data-schemas package * test: Add integration tests for math function with environment variable expressions * refactor: Update test description for clarity on expiresIn behavior * refactor: Update test cases to clarify default expiration behavior for token generation * refactor: Improve error handling in math function for clearer evaluation errors
This commit is contained in:
parent
d0863de8d4
commit
6ffb176056
14 changed files with 602 additions and 85 deletions
2
package-lock.json
generated
2
package-lock.json
generated
|
|
@ -93,6 +93,7 @@
|
|||
"klona": "^2.0.6",
|
||||
"librechat-data-provider": "*",
|
||||
"lodash": "^4.17.21",
|
||||
"mathjs": "^15.1.0",
|
||||
"meilisearch": "^0.38.0",
|
||||
"memorystore": "^1.6.7",
|
||||
"mime": "^3.0.0",
|
||||
|
|
@ -48979,6 +48980,7 @@
|
|||
"keyv": "^5.3.2",
|
||||
"keyv-file": "^5.1.2",
|
||||
"librechat-data-provider": "*",
|
||||
"mathjs": "^15.1.0",
|
||||
"memorystore": "^1.6.7",
|
||||
"mongoose": "^8.12.1",
|
||||
"node-fetch": "2.7.0",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue