Skip to content

Commit

Permalink
Only log used builder URL
Browse files Browse the repository at this point in the history
  • Loading branch information
nflaig committed Dec 11, 2023
1 parent 876063f commit 71fef20
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/beacon-node/src/execution/builder/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class ExecutionBuilderHttp implements IExecutionBuilder {
) {
const baseUrl = opts.urls[0];
if (!baseUrl) throw Error("No Url provided for executionBuilder");
logger?.info("External builder", {urls: opts.urls.map(toSafePrintableUrl).toString()});
logger?.info("External builder", {url: toSafePrintableUrl(baseUrl)});
this.api = getClient(
{
baseUrl,
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/src/url.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export function toSafePrintableUrl(urlStr: string): string {
try {
return new URL(urlStr).origin;
} catch (_) {
// Best effort to sanitize if an invalid URL is provided
// Best effort to sanitize value if an invalid URL is provided
return urlStr.replace(/(.*?:\/\/|.*?:\/)?(.*?:.*?@)/, "$1");

Check failure

Code scanning / CodeQL

Polynomial regular expression used on uncontrolled data High

This
regular expression
that depends on
library input
may run slow on strings with many repetitions of 'a'.
This
regular expression
that depends on
library input
may run slow on strings with many repetitions of 'a'.
This
regular expression
that depends on
library input
may run slow on strings with many repetitions of 'a'.
This
regular expression
that depends on
library input
may run slow on strings starting with ':' and with many repetitions of ':'.
This
regular expression
that depends on
library input
may run slow on strings with many repetitions of 'a'.
This
regular expression
that depends on
library input
may run slow on strings with many repetitions of 'a'.
This
regular expression
that depends on
library input
may run slow on strings with many repetitions of 'a'.
This
regular expression
that depends on
library input
may run slow on strings starting with ':' and with many repetitions of ':'.
This
regular expression
that depends on
library input
may run slow on strings with many repetitions of 'a'.
This
regular expression
that depends on
library input
may run slow on strings with many repetitions of 'a'.
This
regular expression
that depends on
library input
may run slow on strings with many repetitions of 'a'.
This
regular expression
that depends on
library input
may run slow on strings starting with ':' and with many repetitions of ':'.
This
regular expression
that depends on
library input
may run slow on strings with many repetitions of 'a'.
This
regular expression
that depends on
library input
may run slow on strings with many repetitions of 'a'.
This
regular expression
that depends on
library input
may run slow on strings with many repetitions of 'a'.
This
regular expression
that depends on
library input
may run slow on strings starting with ':' and with many repetitions of ':'.
This
regular expression
that depends on
library input
may run slow on strings with many repetitions of 'a'.
This
regular expression
that depends on
library input
may run slow on strings with many repetitions of 'a'.
This
regular expression
that depends on
library input
may run slow on strings with many repetitions of 'a'.
This
regular expression
that depends on
library input
may run slow on strings starting with ':' and with many repetitions of ':'.
This
regular expression
that depends on
library input
may run slow on strings with many repetitions of 'a'.
This
regular expression
that depends on
library input
may run slow on strings with many repetitions of 'a'.
This
regular expression
that depends on
library input
may run slow on strings with many repetitions of 'a'.
This
regular expression
that depends on
library input
may run slow on strings starting with ':' and with many repetitions of ':'.
This
regular expression
that depends on
library input
may run slow on strings with many repetitions of 'a'.
This
regular expression
that depends on
library input
may run slow on strings with many repetitions of 'a'.
This
regular expression
that depends on
library input
may run slow on strings with many repetitions of 'a'.
This
regular expression
that depends on
library input
may run slow on strings starting with ':' and with many repetitions of ':'.
}
}

0 comments on commit 71fef20

Please sign in to comment.