[Svn] r4661 - in trunk/roundcubemail: . program/include

trac at roundcube.net trac at roundcube.net
Fri Apr 15 18:07:02 CEST 2011


Author: thomasb
Date: 2011-04-15 11:07:01 -0500 (Fri, 15 Apr 2011)
New Revision: 4661

Modified:
   trunk/roundcubemail/CHANGELOG
   trunk/roundcubemail/program/include/rcmail.php
   trunk/roundcubemail/program/include/rcube_template.php
Log:
Add hook for request token creation (upon user request)

Modified: trunk/roundcubemail/CHANGELOG
===================================================================
--- trunk/roundcubemail/CHANGELOG	2011-04-15 15:55:38 UTC (rev 4660)
+++ trunk/roundcubemail/CHANGELOG	2011-04-15 16:07:01 UTC (rev 4661)
@@ -1,6 +1,7 @@
 CHANGELOG Roundcube Webmail
 ===========================
 
+- Added plugin hook for request token creation
 - Replace LDAP vars in group queries (#1487837)
 - Fix vcard folding with uncode characters (#1487868)
 - Keep all submitted data if contact form validation fails (#1487865)

Modified: trunk/roundcubemail/program/include/rcmail.php
===================================================================
--- trunk/roundcubemail/program/include/rcmail.php	2011-04-15 15:55:38 UTC (rev 4660)
+++ trunk/roundcubemail/program/include/rcmail.php	2011-04-15 16:07:01 UTC (rev 4661)
@@ -1108,7 +1108,8 @@
   {
     $sess_id = $_COOKIE[ini_get('session.name')];
     if (!$sess_id) $sess_id = session_id();
-    return md5('RT' . $this->task . $this->config->get('des_key') . $sess_id);
+    $plugin = $this->plugins->exec_hook('request_token', array('value' => md5('RT' . $this->task . $this->config->get('des_key') . $sess_id)));
+    return $plugin['value'];
   }
 
 

Modified: trunk/roundcubemail/program/include/rcube_template.php
===================================================================
--- trunk/roundcubemail/program/include/rcube_template.php	2011-04-15 15:55:38 UTC (rev 4660)
+++ trunk/roundcubemail/program/include/rcube_template.php	2011-04-15 16:07:01 UTC (rev 4661)
@@ -69,7 +69,6 @@
 
         //$this->framed = $framed;
         $this->set_env('task', $task);
-        $this->set_env('request_token', $this->app->get_request_token());
 
         // load the correct skin (in case user-defined)
         $this->set_skin($this->config['skin']);
@@ -342,6 +341,9 @@
         else if ($unlock) {
             array_unshift($this->js_commands, array('hide_message', $unlock));
         }
+
+        $this->set_env('request_token', $this->app->get_request_token());
+
         // write all env variables to client
         $js = $this->framed ? "if(window.parent) {\n" : '';
         $js .= $this->get_js_commands() . ($this->framed ? ' }' : '');

_______________________________________________
http://lists.roundcube.net/mailman/listinfo/svn



More information about the Svn mailing list