Changeset 961

Show
Ignore:
Timestamp:
03/04/2008 12:01:56 AM (3 years ago)
Author:
DotMG
Message:

Validating $_SESSION['redirectmessage'] before use. addslashes($this->htmlspecialchars_ent($message)) gives a sanitized string.

fixes #695

Location:
trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/libs/Wakka.class.php

    r944 r961  
    25452545        } 
    25462546        /** 
    2547          * Get a message, if one was stored before redirection. 
    2548          * 
     2547         * Get a message, if one was stored before redirection.  
     2548         * To set the message, either use {@link Wakka::SetRedirectMessage()} or the second parameter 
     2549         * of the {@link Wakka::Redirect()} method. 
     2550         * The message is passed transparently between {@link Wakka::SetRedirectMessage()} and  
     2551         * GetRedirectMessage(). It is the responsibility of any code setting and getting that  
     2552         * message to perform any validation against the message (quotes handling, XHTML validation, ...) 
     2553         * 
     2554         * @see Wakka::Redirect() 
     2555         * @see Wakka::SetRedirectMessage() 
    25492556         * @return string either the text of the message or an empty string. 
    25502557         */ 
  • trunk/templates/header.php

    r892 r961  
    4646// get "input" variables 
    4747$message = $this->GetRedirectMessage(); 
     48$message = addslashes($this->htmlspecialchars_ent($message)); 
    4849 
    4950// init output variables