Skip to content

Commit 678dc5f

Browse files
committed
fix: fixing SSTI by removing eval style format string
1 parent 29545ed commit 678dc5f

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

packages/orap/task/storable.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export abstract class TaskStorable extends TaskBase {
1818
static async _load<T extends TaskStorable>(this: Constructor<T>, sm: StoreManager): Promise<T> {
1919
const instance = new this()
2020
// get all task keys
21-
const keys = await sm.keys(`${instance.getTaskPrefix()}*`, true)
21+
const keys = await sm.keys(instance.getTaskPrefix() + '*', true)
2222
// get the first task (del when finish)
2323
const serializedTask: string = (await sm.get(keys[0]))! // never undefined ensured by keys isWait=true
2424

packages/utils/common/logger.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export class Logger {
4444
const method = type === 'info' ? 'log' : type
4545
const format = () => {
4646
const tag = this.tagMap[type]
47-
return `${colors.dim(this.timeFormatter.format(new Date()))} ${tag} ${msg}`
47+
return colors.dim(this.timeFormatter.format(new Date())) + ' ' + tag + ' ' + msg;
4848
}
4949
console[method](format())
5050
}

packages/utils/w3/event.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export function getEventSignature(abi: any[], eventName: string): string {
88
const eventFragment = iface.getEvent(eventName)
99

1010
if (!eventFragment)
11-
throw new Error(`event ${eventName} not found.`)
11+
throw new Error("event " + eventName + " not found.")
1212

1313
// Return the event topic (which is the event signature)
1414
return eventFragment.topicHash

0 commit comments

Comments
 (0)