CoreFiles by mySites.guru
view.html.php41 lines, 1,001 bytes, from Joomla_3.7.2-Stable-Full_Package.zip
Raw History Compare with 3.7.1
md5
9a8cc126780ad0562d1697648d053c25
sha1
f411d117962f6c896f97da9aa1eaf0ed60fc17c7
sha256
c36c6f0aa11c43f9d48b16b7113bac775df12bbb807d125cee29a332dd328c36
<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_login
 *
 * @copyright   Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * HTML View class for the Login component
 *
 * @since  1.6
 */
class LoginViewLogin extends JViewLegacy
{
  	/**
	 * Display the view.
	 *
	 * @param   string  $tpl  The name of the template file to parse.
	 *
	 * @return  void
	 *
	 * @since  3.7.0
	 */
	public function display($tpl = null)
	{
		/**
		 * To prevent clickjacking, only allow the login form to be used inside a frame in the same origin.
		 * So send a X-Frame-Options HTTP Header with the SAMEORIGIN value.
		 * 
		 * @see https://www.owasp.org/index.php/Clickjacking_Defense_Cheat_Sheet
		 *      https://tools.ietf.org/html/rfc7034
		 */
		JFactory::getApplication()->setHeader('X-Frame-Options', 'SAMEORIGIN');

		return parent::display($tpl);
	}
}

The same content is in 14 releases, Joomla 3.7.0-alpha2 to 3.7.2. See them all, or every version of this file.