chg: further replaced helma’s md5 implementation with apache commons codec
This commit is contained in:
parent
be233eba03
commit
39f565252f
4 changed files with 6 additions and 6 deletions
Binary file not shown.
|
@ -49,7 +49,7 @@ helma.auth = function(realm) {
|
|||
var accessAllowed = true;
|
||||
if (req.data.username && req.data.password) {
|
||||
if (pw && hostIsAllowed()) {
|
||||
if (pw == Packages.helma.util.MD5Encoder.encode(req.data.username + "-" + req.data.password)) {
|
||||
if (pw == Packages.org.apache.commons.codec.digest.DigestUtils.md5Hex(req.data.username + "-" + req.data.password)) {
|
||||
session.data[realm+'Authenticated'] = true;
|
||||
res.redirect(res.data.href);
|
||||
} else {
|
||||
|
@ -61,7 +61,7 @@ helma.auth = function(realm) {
|
|||
The adminAccess property is not set.<br />\
|
||||
Before proceeding, add the following line to your app.properties or server.properties file:\
|
||||
<br /><br />adminAccess='
|
||||
+ Packages.helma.util.MD5Encoder.encode(req.data.username + "-" + req.data.password);
|
||||
+ Packages.org.apache.commons.codec.digest.DigestUtils.md5Hex(req.data.username + "-" + req.data.password);
|
||||
else param.message += 'The '+ realm +'AccessAllowed property does not match your host.<br />\
|
||||
Before proceeding, remove this property from your app.properties or server.properties file \
|
||||
or include your host as follows:<br /><br />'
|
||||
|
|
2
src/dist/apps/manage/Global/functions.js
vendored
2
src/dist/apps/manage/Global/functions.js
vendored
|
@ -123,7 +123,7 @@ function checkAuth(appObj) {
|
|||
if (uname == null || uname == "" || pwd == null || pwd == "")
|
||||
return forceAuth();
|
||||
|
||||
var md5key = Packages.helma.util.MD5Encoder.encode(uname + "-" + pwd);
|
||||
var md5key = Packages.org.apache.commons.codec.digest.DigestUtils.md5Hex(uname + "-" + pwd);
|
||||
|
||||
if (md5key == adminAccess)
|
||||
return true;
|
||||
|
|
2
src/dist/apps/manage/Root/actions.js
vendored
2
src/dist/apps/manage/Root/actions.js
vendored
|
@ -75,7 +75,7 @@ function makekey_action() {
|
|||
res.data.body = renderSkinAsString("pwdform", obj);
|
||||
} else {
|
||||
// render the md5-string:
|
||||
obj.propsString = "adminAccess=" + Packages.helma.util.MD5Encoder.encode(req.data.username + "-" + req.data.password) + "<br>\n";
|
||||
obj.propsString = "adminAccess=" + Packages.org.apache.commons.codec.digest.DigestUtils.md5Hex(req.data.username + "-" + req.data.password) + "<br>\n";
|
||||
res.data.body = renderSkinAsString("pwdfeedback", obj);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue