Changeset 5476 in subversion
- Timestamp:
- Nov 23, 2011 1:53:58 PM (18 months ago)
- Location:
- trunk/roundcubemail/program
- Files:
-
- 2 edited
-
include/rcube_template.php (modified) (1 diff)
-
js/app.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/program/include/rcube_template.php
r5471 r5476 72 72 //$this->framed = $framed; 73 73 $this->set_env('task', $task); 74 $this->set_env('x_frame_options', $this->app->config->get('x_frame_options', 'sameorigin')); 74 75 75 76 // load the correct skin (in case user-defined) -
trunk/roundcubemail/program/js/app.js
r5475 r5476 145 145 for (n in this.gui_objects) 146 146 this.gui_objects[n] = rcube_find_object(this.gui_objects[n]); 147 148 // clickjacking protection 149 if (this.env.x_frame_options) { 150 try { 151 // bust frame if not allowed 152 if (this.env.x_frame_options == 'deny' && top.location.href != self.location.href) 153 top.location.href = self.location.href; 154 else if (top.location.hostname != self.location.hostname) 155 throw 1; 156 } catch (e) { 157 // possible clickjacking attack: disable all form elements 158 $('form').each(function(){ ref.lock_form(this, true); }); 159 this.display_message("Blocked: possible clickjacking attack!", 'error'); 160 return; 161 } 162 } 147 163 148 164 // init registered buttons
Note: See TracChangeset
for help on using the changeset viewer.
