Skip to content
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

Secure ERXWOForm generates complete URLs #641

Closed
renebock opened this issue May 8, 2015 · 2 comments
Closed

Secure ERXWOForm generates complete URLs #641

renebock opened this issue May 8, 2015 · 2 comments

Comments

@renebock
Copy link
Contributor

renebock commented May 8, 2015

Is there a reason, why in ERXWOForms line 376ff the following is implemented:

    boolean generatingCompleteURLs = context.doesGenerateCompleteURLs();
    if (secure && !generatingCompleteURLs) {
        context.generateCompleteURLs();
    }

or why is it necessary to force generating complete URLs when using https requests?

Consider the following setup:

 Client --->  https://proxy.domain.one --->  https://WOapp.domain.two

so our app generates
https://WOapp.domain.two/cgi-bin/WebObjects/myApp...
instead of
/cgi-bin/WebObjects/myApp...

Unfortunately the proxy used at domain.one is not capable to rewrite Full-qualified URLs. --> all form-actions are broken :-(

(and no, I can't fix the proxy-server...)

@darkv
Copy link
Member

darkv commented May 19, 2015

Probably the logic should be more like if we are in HTTP mode and the form must be secure then generate complete URLs:

boolean generatingCompleteURLs = context.doesGenerateCompleteURLs();
boolean requestIsSecure = context.secureMode();
if (secure && !requestIsSecure && !generatingCompleteURLs) {
    context.generateCompleteURLs();
}

Other than that situation I don't see any need to use complete URLs. The opposed situation where you have a HTTPS page and want to send the form via HTTP is very unlikely and current implementation does not cover this either. Any thoughts?

@renebock
Copy link
Contributor Author

Yes, this makes sense. I think it's a better solution than the one I had in mind....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants