Skip to Content (Press Enter)
OutSystems.com
Personal Edition
Community
Support
Training
Training
Online Training
Developer Schools
Boot Camps
Certifications
Tech Talks
Documentation
Documentation
Overview
ODC
O11
Forums
Forge
Get Involved
Get Involved
Jobs
Ideas
Members
Mentorship
User Groups
Platform
Platform
ODC
O11
Search in OutSystems
Log in
Get Started
Back to Forums
Joop Stringer
1
Views
1
Comments
How to determine IsLocalUrl ?
Question
During a security check on one of our projects, the advice came to have only local URL's possible to the login webscreen.
The login webscreen has an input OriginalURL ... and redirects to any URL passed into it
We got the advice to do something like this:
public bool IsLocalUrl(string url) {
return System.Web.WebPages.RequestExtensions.IsUrlLocalToHost( RequestContext.HttpContext.Request, url);
}
Anybody got a solution in OutSystems for this ?
Justin James
MVP
You can check the actual server name (GetMachineName and GetMachineInternalName in HtmlRenderer) in the request and compare it to the URL requested (GetURL in HTTPRequestHandler).
J.Ja
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
See the full guidelines
Loading...