Skip to content

Commit

Permalink
Fix form url, throw exception on configuration error (with reflection)
Browse files Browse the repository at this point in the history
  • Loading branch information
Querela committed Nov 15, 2024
1 parent f96ebfa commit 6e7ad92
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ public void reload() {
} catch (IllegalArgumentException | IllegalAccessException | NoSuchFieldException | SecurityException
| NoSuchMethodException | InvocationTargetException e) {
log.error("Failure doing extremely hacking configuration loading for AAI ...", e);
throw new ConfigurationException("Hacky configuration update failed", e);
}

}
}
}
6 changes: 4 additions & 2 deletions src/main/resources/assets/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -51146,10 +51146,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
},

renderLogin: function renderLogin() {
var loginUrl = URLROOT + "/login" + "?redirect=" + encodeURIComponent(CURURL);
var loginUrl = URLROOT + (URLROOT.endsWith("/") || URLROOT.trim().length === 0 ? '' : '/') + "login" + "?redirect=" + encodeURIComponent(CURURL);

function doLogin() {
function doLogin(e) {
document.querySelector('form#login').submit();
e.preventDefault();
e.stopPropagation();
}

return React.createElement(
Expand Down
6 changes: 4 additions & 2 deletions src/main/resources/assets/js/main.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,12 @@ import createReactClass from "create-react-class";
toEmbedded: function (doPushHistory) { this.gotoPage(doPushHistory, 'embed'); },

renderLogin: function () {
var loginUrl = URLROOT + "/login" + "?redirect=" + encodeURIComponent(CURURL);
var loginUrl = URLROOT + (URLROOT.endsWith("/") || URLROOT.trim().length === 0 ? '' : '/') + "login" + "?redirect=" + encodeURIComponent(CURURL);

function doLogin () {
function doLogin(e) {
document.querySelector('form#login').submit();
e.preventDefault();
e.stopPropagation();
}

return (
Expand Down

0 comments on commit 6e7ad92

Please sign in to comment.