-
Notifications
You must be signed in to change notification settings - Fork 2
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
Update dependencies and add CSR subject check. #8
base: master
Are you sure you want to change the base?
Conversation
@@ -1,4 +1,4 @@ | |||
FROM node:12-alpine AS node-builder | |||
FROM node:16-alpine AS node-builder |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why 16? Wouldn't we want to have a more up-to-date version of node?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because that node is available in certbot image we use as final one.
const csrDomain = await shell(`openssl req -in ${csrPath} -subject -noout | cut -c 31-`); | ||
if (csrDomain != "dyndns.dappnode.io") { | ||
rimrafSync(certBaseDir); | ||
throw new BadRequestError("CSR Subject invalid."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this properly caught? Will it cause the app to exit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is caught. You can see that request params were validated in the same way.
@@ -26,7 +26,7 @@ export async function shell( | |||
{ timeout, maxBuffer } | |||
); | |||
return stdout.trim(); | |||
} catch (e) { | |||
} catch (e: any) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you need to define any
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IDK, compiler was complaining for some reason, that code worked fine before. 😅
No description provided.