* Fixed security issue caused by sensitive property in req.data

* Fixed issue caused by setting a Metadata property to a Java value, e.g. java.net.URL instance becomes string without quotes. (Could this be a Rhino bug?)
 * Finalized conversion of AV_USER table to simple naming scheme ("user")
 * Added global getTitle() method which returns either site.title or root.sys_title
 * Implemented universal HopObject.value() method
 * Rededicated User.update() method since its previous functionality is now taken over by User.value()
 * Restructured login and register functionalities in User and MemberMgr
 * Replaced first occurrences of Exception with Error
 * Introduced i18n via gettext in User and MemberMgr
 * Removed getMessage() and Message in User and MemberMgr
 * Added first possible implementation of global getPermission() method
 * Modified code of global evalEmail() and evalURL() methods to work with Helma modules
 * Simplified global sendMail() method by not throwing any MailException anymore and returning the status code only
 * sendMail() now is using helma.Mail (so we can debug message output)
This commit is contained in:
Tobi Schäfer 2007-08-23 17:17:40 +00:00
parent 7d21e881e3
commit e9a7800a87
24 changed files with 401 additions and 436 deletions

View file

@ -219,7 +219,7 @@ Poll.prototype.total_macro = function(param) {
Poll.prototype.editlink_macro = function(param) {
if (session.user) {
try {
this.checkEdit(session.user, req.data.memberlevel);
this.checkEdit(session.user, res.data.memberlevel);
} catch (deny) {
return;
}
@ -237,7 +237,7 @@ Poll.prototype.editlink_macro = function(param) {
Poll.prototype.deletelink_macro = function(param) {
if (session.user) {
try {
this.checkDelete(session.user, req.data.memberlevel);
this.checkDelete(session.user, res.data.memberlevel);
} catch (deny) {
return;
}
@ -254,7 +254,7 @@ Poll.prototype.deletelink_macro = function(param) {
Poll.prototype.viewlink_macro = function(param) {
try {
if (!this.closed) {
this.checkVote(session.user, req.data.memberlevel);
this.checkVote(session.user, res.data.memberlevel);
Html.link({href: this.href()},
param.text ? param.text : getMessage("Poll.vote"));
}
@ -271,7 +271,7 @@ Poll.prototype.viewlink_macro = function(param) {
Poll.prototype.closelink_macro = function(param) {
if (session.user) {
try {
this.checkDelete(session.user, req.data.memberlevel);
this.checkDelete(session.user, res.data.memberlevel);
} catch (deny) {
return;
}
@ -339,7 +339,7 @@ Poll.prototype.evalPoll = function(question, choices, creator) {
* - url (String): the URL string of the poll
*/
Poll.prototype.evalVote = function(param, usr) {
this.checkVote(usr, req.data.memberlevel);
this.checkVote(usr, res.data.memberlevel);
if (!param.choice)
throw new Exception("noVote");
var c = this.get(param.choice);