-
Notifications
You must be signed in to change notification settings - Fork 0
Feat/sync #32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…lasticdb-tvl Feature/add elasticdb tvl
…umentId Issue 501 - C2D getJobStatus - did vs documentId vs agreementId
…tem-test-nonce fix system tests. Running old version of node?
…ter-index-log Add cleaner logging when idexing and getting/updating block info from db
…ndex-chain-improv improve reindex command, optional block, also check if thread is running
…hboard-hash fix dashboard hash out of sync
| }) | ||
| } else if (filter.includes(':=[')) { | ||
| ;[field, value] = filter.split(':=[') | ||
| const values = value.replace(']', '').split(',') |
Check failure
Code scanning / CodeQL
Incomplete string escaping or encoding High
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 1 year ago
To fix the problem, we need to ensure that all occurrences of the closing bracket (]) in the value string are replaced. This can be achieved by using a regular expression with the global flag (g). This change will ensure that all instances of the closing bracket are replaced, not just the first one.
-
Copy modified line R30
| @@ -29,3 +29,3 @@ | ||
| ;[field, value] = filter.split(':=[') | ||
| const values = value.replace(']', '').split(',') | ||
| const values = value.replace(/\]/g, '').split(',') | ||
| elasticsearchQuery.query.bool.filter.push({ |
| } | ||
| } catch (error) { | ||
| HTTP_LOGGER.error(error.message) | ||
| res.status(500).send(error) |
Check warning
Code scanning / CodeQL
Information exposure through a stack trace Medium
stack trace information
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 1 year ago
To fix the problem, we need to ensure that stack traces or any sensitive information contained in the error object are not exposed to the client. Instead, we should log the error details on the server and send a generic error message to the client.
- Modify the catch block to log the error details using
HTTP_LOGGER.errorand send a generic error message to the client. - Ensure that the error message sent to the client does not contain any sensitive information.
-
Copy modified lines R31-R32
| @@ -30,4 +30,4 @@ | ||
| } catch (error) { | ||
| HTTP_LOGGER.error(error.message) | ||
| res.status(500).send(error) | ||
| HTTP_LOGGER.error(error.stack || error.message) | ||
| res.status(500).send("An unexpected error occurred") | ||
| } |
| }) | ||
| } | ||
|
|
||
| app.use('/dashboard', serveIndexHtml) |
Check failure
Code scanning / CodeQL
Missing rate limiting High
a file system access
| } | ||
|
|
||
| app.use('/dashboard', serveIndexHtml) | ||
| app.use('/controlpanel', serveIndexHtml) |
Check failure
Code scanning / CodeQL
Missing rate limiting High
sync from ocean node community version