env.js: fix httpSafePort handling#1571
Open
martinetd wants to merge 3 commits intocryptpad:stagingfrom
Open
Conversation
11 tasks
It has been clarified that this is only a dev option that should not be used in production, but setting the value in config was still ignored, so fix the init code to consider the config value and make it clear that this port is not bound if safeOrigin is set.
NO_SANDBOX was removed in commit fde6f15 ("Fix headers added by node for the recommended config")
I had originally tried disabling as it is not used directly in the "simple" nginx example config, but everything stops working, so just document it must not be disabled instead.
Contributor
Author
|
(rebased to fix conflict in 2025.9.0 -- this really should have zero impact on production and just fixes an optional setting that doesn't work right now. Perhaps it'd be better to remove the httpSafePort setting altogether instead?) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a follow-up of #1212 I had opened last year:
httpSafePortuse inconfig.example.js#1518, but it still isn't clear enough as seen in Make httpSafePort work as expected when httpSafeOrigin is set #1514 -- improve the comment a bit.all in all there is nothing impacting any production setup, but might as well finish this so I can get it off my todo. Thanks!