Skip to content

Host security workaround #15

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

Open
wants to merge 2 commits into
base: master
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
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ RUN npm install
EXPOSE 3000
ENV DEBUG_IDM_WEB 1
ENV DEBUG_IDM_CORE 1
ENV DISABLE_DEVICE_IP_MATCH 0
CMD ./Start.sh
4 changes: 3 additions & 1 deletion routes/oauth2-routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,13 @@ function oauth2Router(tokenconf, entityStorageConf) {
return done(null, false);
}
console.log('client ' + JSON.stringify(client));
if (redirectURI === client.redirectURI) {
console.log("same uri =" + (redirectURI === client.redirectURI) );
if (redirectURI === client.redirectURI || process.env.DISABLE_DEVICE_IP_MATCH === "1"){
return done(null, client, redirectURI);
} else {
return done(new Error("client URL doesn't match what was expected. Provided: " + redirectURI + " expected " + client.redirectURI), null);
}

});
}, function (client, user, done) {
console.log("authorization endpoint is called (either for implicit or authorization code) with client Id " + client.id + " for user id " + user.id + ". We always accept as long as client url matches");
Expand Down