Changeset 4615 in subversion
- Timestamp:
- Mar 22, 2011 3:49:43 AM (2 years ago)
- Location:
- trunk/roundcubemail
- Files:
-
- 4 edited
-
CHANGELOG (modified) (1 diff)
-
index.php (modified) (2 diffs)
-
program/include/rcmail.php (modified) (2 diffs)
-
program/js/app.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/CHANGELOG
r4606 r4615 2 2 =========================== 3 3 4 - Stateless request tokens. No keep-alive necessary on login page (#1487829) 4 5 - PEAR::Net_SMTP 1.5.1 5 6 - Allow multiple concurrent compose sessions -
trunk/roundcubemail/index.php
r4609 r4615 155 155 // not logged in -> show login page 156 156 if (empty($RCMAIL->user->ID)) { 157 if ($RCMAIL->action == 'keep-alive') 158 $OUTPUT->send(); 159 else if ($OUTPUT->ajax_call) 157 if ($OUTPUT->ajax_call) 160 158 $OUTPUT->redirect(array(), 2000); 161 159 … … 185 183 // check client X-header to verify request origin 186 184 if ($OUTPUT->ajax_call) { 187 if (rc_request_header('X-Roundcube-Request') != $RCMAIL->get_request_token() ) {185 if (rc_request_header('X-Roundcube-Request') != $RCMAIL->get_request_token() && !$RCMAIL->config->get('devel_mode')) { 188 186 header('HTTP/1.1 404 Not Found'); 189 187 die("Invalid Request"); -
trunk/roundcubemail/program/include/rcmail.php
r4604 r4615 1107 1107 public function get_request_token() 1108 1108 { 1109 $key = $this->task; 1110 1111 if (!$_SESSION['request_tokens'][$key]) 1112 $_SESSION['request_tokens'][$key] = md5(uniqid($key . mt_rand(), true)); 1113 1114 return $_SESSION['request_tokens'][$key]; 1109 $sess_id = $_COOKIE[ini_get('session.name')]; 1110 return md5('RT' . $this->task . $this->config->get('des_key') . $sess_id); 1115 1111 } 1116 1112 … … 1125 1121 { 1126 1122 $token = get_input_value('_token', $mode); 1127 return !empty($token) && $_SESSION['request_tokens'][$this->task] == $token; 1123 $sess_id = $_COOKIE[ini_get('session.name')]; 1124 return !empty($sess_id) && $token == $this->get_request_token(); 1128 1125 } 1129 1126 -
trunk/roundcubemail/program/js/app.js
r4611 r4615 5432 5432 if (this.env.keep_alive && !this.env.framed && this.task == 'mail' && this.gui_objects.mailboxlist) 5433 5433 this._int = setInterval(function(){ ref.check_for_recent(false); }, this.env.keep_alive * 1000); 5434 else if (this.env.keep_alive && !this.env.framed && this. env.action != 'print')5434 else if (this.env.keep_alive && !this.env.framed && this.task != 'login' && this.env.action != 'print') 5435 5435 this._int = setInterval(function(){ ref.send_keep_alive(); }, this.env.keep_alive * 1000); 5436 5436 };
Note: See TracChangeset
for help on using the changeset viewer.
