gristlabs_grist-core/app/server/lib
Dmitry S 2b581ab7dc (core) Fix issue with lodash's map interpreting objects with length as array-like
Summary:
Here's a series of badness that easily leads to a crash, in reverse order:
- Lodash's map() function interprets an object with a .length property as an array.
- Some very old code generated human-friendly descriptions of user actions,
  applying map() to parts of them. It so happens that this generated description
  isn't even used.
- If a user action is encountered with a sufficiently large length propery,
  map() would exhaust the server memory.

Fixed by removing old unneeded code, and replacing some other occurrences of
lodash's map() with native equivalents.

Test Plan: Tested manually on a local reproduction of the issue.

Reviewers: paulfitz

Reviewed By: paulfitz

Subscribers: paulfitz

Differential Revision: https://phab.getgrist.com/D3938
2023-07-01 21:07:39 -04:00
..
AccessTokens.ts
ACLFormula.ts
ActionHistory.ts (core) Fix issue with lodash's map interpreting objects with length as array-like 2023-07-01 21:07:39 -04:00
ActionHistoryImpl.ts support other SQLite wrappers, and various hooks needed by grist-static (#516) 2023-05-23 15:17:28 -04:00
ActiveDoc.ts (core) Implement exported functions without relying on ActiveDoc.docData 2023-06-07 22:30:01 +02:00
ActiveDocImport.ts (core) Set DateTime timezone during xlsx import 2023-05-24 11:39:49 -04:00
AppEndpoint.ts (core) Add optional telemetry to grist-core 2023-06-07 12:00:51 -04:00
AppSettings.ts
Assistance.ts (core) Modify prompt so that model may say it cannot help with certain requests. 2023-06-27 15:57:56 +02:00
Authorizer.ts (core) Add optional telemetry to grist-core 2023-06-07 12:00:51 -04:00
BrowserSession.ts
checksumFile.ts
Client.ts (core) Add optional telemetry to grist-core 2023-06-07 12:00:51 -04:00
Comm.ts
configureMinIOExternalStorage.ts
dbUtils.ts
DiscourseConnect.ts
DocApi.ts (core) Polish telemetry code 2023-06-09 13:03:10 -04:00
DocClients.ts
DocManager.ts (core) port some more test/browser tests to newer selenium 2023-04-12 13:00:53 -04:00
DocPluginData.ts
DocPluginManager.ts
DocSession.ts
DocSnapshots.ts Track saved version per hour, day, week, month, year, and number of times a version with parameter (#509) 2023-05-12 11:38:29 -04:00
DocStorage.ts support other SQLite wrappers, and various hooks needed by grist-static (#516) 2023-05-23 15:17:28 -04:00
DocStorageManager.ts
docUtils.d.ts
docUtils.js
DocWorker.ts
DocWorkerMap.ts
ExcelFormatter.ts (core) Currency from grist column is persistent when exporting to excel 2023-05-08 10:39:01 +02:00
ExpandedQuery.ts
Export.ts (core) For exporting XLSX, do it memory-efficiently in a worker thread. 2023-06-01 12:06:48 -04:00
ExportCSV.ts (core) For exporting XLSX, do it memory-efficiently in a worker thread. 2023-06-01 12:06:48 -04:00
ExportTableSchema.ts (core) Fix imports into reference columns, and support two ways to import Numeric as a reference. 2023-05-02 10:28:14 -04:00
ExportXLSX.ts (core) tweak handler for aborted connections to work on modern node 2023-06-16 10:20:53 -04:00
expressWrap.ts (core) For exporting XLSX, do it memory-efficiently in a worker thread. 2023-06-01 12:06:48 -04:00
ExternalStorage.ts
extractOrg.ts
FileParserElement.ts
filterUtils.ts
FlexServer.ts (core) Fix recording of signups, and record as telemetry too. 2023-06-15 00:15:18 -04:00
ForwardAuthLogin.ts
GoogleAuth.ts
GoogleExport.ts (core) For exporting XLSX, do it memory-efficiently in a worker thread. 2023-06-01 12:06:48 -04:00
GoogleImport.ts
GranularAccess.ts support other SQLite wrappers, and various hooks needed by grist-static (#516) 2023-05-23 15:17:28 -04:00
GristServer.ts (core) Fix recording of signups, and record as telemetry too. 2023-06-15 00:15:18 -04:00
gristSessions.ts
guessExt.ts
HashUtil.ts
HostedMetadataManager.ts
HostedStorageManager.ts
httpEncoding.ts
IBilling.ts
IChecksumStore.ts
ICreate.ts (core) Add optional telemetry to grist-core 2023-06-07 12:00:51 -04:00
IDocStorageManager.ts
idUtils.ts
IElectionStore.ts
initialDocSql.ts (core) reconcile webhook and widget description migrations 2023-05-15 11:56:15 -04:00
INotifier.ts
ISandbox.ts
IShell.ts
ITestingHooks-ti.ts
ITestingHooks.ts
log.ts
LogMethods.ts
manifest.ts
MinimalLogin.ts
MinIOExternalStorage.ts Add region param for MinIO bucket (#428) 2023-02-15 09:12:38 -05:00
NSandbox.ts support other SQLite wrappers, and various hooks needed by grist-static (#516) 2023-05-23 15:17:28 -04:00
NullSandbox.ts (core) Fix snapshot migrations 2023-05-23 15:50:15 -04:00
OnDemandActions.ts (core) Adds a UI panel for managing webhooks 2023-05-08 18:25:27 -04:00
PermissionInfo.ts
Permit.ts
places.ts
PluginEndpoint.ts
PluginManager.ts
ProcessMonitor.ts (core) Add optional telemetry to grist-core 2023-06-07 12:00:51 -04:00
ProxyAgent.ts (core) Add logging of errors whenever ProxyAgent is used, and a test for it. 2023-05-17 10:21:53 -04:00
reportTimeTaken.ts
Requests.ts (core) Add logging of errors whenever ProxyAgent is used, and a test for it. 2023-05-17 10:21:53 -04:00
requestUtils.ts (core) tweak handler for aborted connections to work on modern node 2023-06-16 10:20:53 -04:00
RowAccess.ts
SafePythonComponent.ts
SamlConfig.ts
SandboxControl.ts
sandboxUtil.ts
sendAppPage.ts (core) Add optional telemetry to grist-core 2023-06-07 12:00:51 -04:00
ServerColumnGetters.ts
ServerLocale.ts
serverUtils.ts (core) Add optional telemetry to grist-core 2023-06-07 12:00:51 -04:00
Sessions.ts
Sharing.ts (core) port some more test/browser tests to newer selenium 2023-04-12 13:00:53 -04:00
shortDesc.ts
shutdown.js support other SQLite wrappers, and various hooks needed by grist-static (#516) 2023-05-23 15:17:28 -04:00
SqliteCommon.ts support other SQLite wrappers, and various hooks needed by grist-static (#516) 2023-05-23 15:17:28 -04:00
SQLiteDB.ts support other SQLite wrappers, and various hooks needed by grist-static (#516) 2023-05-23 15:17:28 -04:00
SqliteNode.ts support other SQLite wrappers, and various hooks needed by grist-static (#516) 2023-05-23 15:17:28 -04:00
TableMetadataLoader.ts
TagChecker.ts
Telemetry.ts (core) add a cli command to view telemetry settings 2023-06-12 09:58:38 -04:00
TestingHooks.ts
TestLogin.ts
Throttle.ts
TimeQuery.ts (core) Adds a UI panel for managing webhooks 2023-05-08 18:25:27 -04:00
Triggers.ts (core) Add optional telemetry to grist-core 2023-06-07 12:00:51 -04:00
UnsafeNodeComponent.ts
uploads.ts
WidgetRepository.ts
WorkCoordinator.ts support other SQLite wrappers, and various hooks needed by grist-static (#516) 2023-05-23 15:17:28 -04:00
workerExporter.ts (core) Rearrange ExportXLSX code and fix ExportsAccessRules test that became flaky 2023-06-02 10:23:33 -04:00