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;
|
var accessAllowed = true;
|
||||||
if (req.data.username && req.data.password) {
|
if (req.data.username && req.data.password) {
|
||||||
if (pw && hostIsAllowed()) {
|
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;
|
session.data[realm+'Authenticated'] = true;
|
||||||
res.redirect(res.data.href);
|
res.redirect(res.data.href);
|
||||||
} else {
|
} else {
|
||||||
|
@ -61,7 +61,7 @@ helma.auth = function(realm) {
|
||||||
The adminAccess property is not set.<br />\
|
The adminAccess property is not set.<br />\
|
||||||
Before proceeding, add the following line to your app.properties or server.properties file:\
|
Before proceeding, add the following line to your app.properties or server.properties file:\
|
||||||
<br /><br />adminAccess='
|
<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 />\
|
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 \
|
Before proceeding, remove this property from your app.properties or server.properties file \
|
||||||
or include your host as follows:<br /><br />'
|
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 == "")
|
if (uname == null || uname == "" || pwd == null || pwd == "")
|
||||||
return forceAuth();
|
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)
|
if (md5key == adminAccess)
|
||||||
return true;
|
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);
|
res.data.body = renderSkinAsString("pwdform", obj);
|
||||||
} else {
|
} else {
|
||||||
// render the md5-string:
|
// 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);
|
res.data.body = renderSkinAsString("pwdfeedback", obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue