Overwrite host and webroot when forcessl is enabled#1872
Conversation
|
looks good 👍 |
There was a problem hiding this comment.
Please dont use <>, use !== instead
There was a problem hiding this comment.
But this is used all over the code or did you mean line number 17?
There was a problem hiding this comment.
@Raydiation Should OC_Config::getValue always use !== instead of <> for strings?
There was a problem hiding this comment.
Should I add a patch to this pull request or via separated pull request?
There was a problem hiding this comment.
to the pull request.
This patch enables the use of forcessl together with a multiple domains reverse SSL proxy (owncloud#1099) which have different hostname and webroot for http and https access. The code assumes that the ssl proxy (https) hostname and webroot is configured via overwritehost and overwritewebroot.
The not equal comparison (<>) of a variable with an empty string could lead to false positive results as the compare do not check the type and thereby could not make sure that the checked variable is a string. The usage of the not identical comparison operator (!==) make sure that the variable is a string and not empty.
|
@Raydiation Is this pull request okay for you now? |
|
looks good, but i would do the forcessl check in serverProtocol to make it clearer when the overwriteprotocol is returned |
|
@bartv2 You need the forcessl check in all functions except serverProtocol because you need to use the overwrite values for the redirect. This is different for the protocol because it is used to detect http connections. But I can move this to the different functions if this is preferred. |
|
@herbrechtsmeier hmm, will take an other look |
|
I see when this would be usefull ... |
Overwrite host and webroot when forcessl is enabled
|
This pull request should be back ported to stable5 to close #3048. |
|
@bartv2 @karlitschek Is it possible to merged this patches into stable5? |
|
@bartv2 What do you think? |
This patch enables the use of forcessl together with a multiple domains
reverse SSL proxy (#1099) which have different hostname
and webroot for http and https access. The code assumes that the ssl
proxy (https) hostname and webroot is configured via overwritehost and
overwritewebroot.