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

Fixes Incomplete URL substring sanitization vulnerability detected by CodeQL #3521

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .project
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,24 @@
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
</natures>
<filteredResources>
<filter>
<id>1687118849170</id>
<name></name>
<type>30</type>
<matcher>
<id>org.eclipse.core.resources.regexFilterMatcher</id>
<arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
</matcher>
</filter>
</filteredResources>
</projectDescription>
12 changes: 8 additions & 4 deletions app/scripts/initialTasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@
var baseApiUrl = "https://demo.mifos.io";
var host = "";
var portNumber = "";

// Extract the last two parts of the hostname
var lastTwoParts = mainLink.hostname.split('.').slice(-2).join('.');

//accessing from openmf server
if (mainLink.hostname.indexOf('mifos.io') >= 0) {
var hostname = window.location.hostname;
if (lastTwoParts === 'mifos.io') {
var hostname = mainLink.hostname;
console.log('hostname---' + hostname);
domains = hostname.split('.');
var domains = hostname.split('.');
console.log('domains---' + domains);
// For multi tenant hosting
if (domains[0] == "demo") {
Expand Down Expand Up @@ -96,4 +100,4 @@ QueryParameters = (function () {
}
}
return result;
}());
}());