INFORMATICS

The Best

Przełącznik języka

Zaproś mnie na KAWE

Jeżeli podoba Ci się strona i chcesz wspomóc projekt!

Postaw mi kawę na buycoffee.to

This Site

Płatnik

CMS

Hardware

Uncategorised

Emulators

Powershell

Storage Array

DNS

Antivirus program

Licznik

2.png8.png9.png8.png7.png1.png0.png
Today48
Yesterday798
This week5966
This month18835
Total2898710

Visitor Info

  • IP: 3.144.113.197
  • Browser: Unknown
  • Browser Version:
  • Operating System: Unknown

Who Is Online

7
Online

niedziela, 28 kwiecień 2024 01:25

Joomla 3.6 - 3.7 - biała strona administratora - Fatal error login.php

Gwiazdka nieaktywnaGwiazdka nieaktywnaGwiazdka nieaktywnaGwiazdka nieaktywnaGwiazdka nieaktywna
 

Joomla 3.6 - 3.7 - biała strona administratora - Fatal error login.php

Błąd na stronie administracyjnej joomla - po wpisaniu hasła strona administratora joomla się nie wyświetla.

W logach znajdujemy następujący błąd:

Notice: Undefined offset: 0 in /www/site/libraries/vendor/joomla/input/src/Input.php on line 313, referer: http://webpage/administrator

Fatal error: Call to a member function get() on null in /www/administrator/components/com_login/models/login.php on line 33 referer: http://webpage/administrator

 

Błądny skrypt - login.php - rozmiar 4525 B

/**
* @package Joomla.Administrator
* @subpackage com_login
*
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights r
eserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

defined('_JEXEC') or die;

/**
* Login Model
*
* @since 1.5
*/
class LoginModelLogin extends JModelLegacy
{
/**
* Method to auto-populate the model state.
*
* Note. Calling getState in this method will result in recursion.
*
* @return void
*
* @since 1.6
*/
protected function populateState()
{
$input = JFactory::getApplication()->input->getInputForRequestMethod();

$credentials = array(
'username' => $input->get('username', '', 'USERNAME'),
'password' => $input->get('passwd', '', 'RAW'),
'secretkey' => $input->get('secretkey', '', 'RAW'),
);

$this->setState('credentials', $credentials);

// Check for return URL from the request first.
if ($return = $input->get('return', '', 'BASE64'))
{
$return = base64_decode($return);

if (!JUri::isInternal($return))
{
$return = '';
}
}

// Set the return URL if empty.
if (empty($return))
{
$return = 'index.php';

 poprawny login.php - rozmiar - 4579 B

/**
* @package Joomla.Administrator
* @subpackage com_login
*
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

defined('_JEXEC') or die;

/**
* Login Model
*
* @since 1.5
*/
class LoginModelLogin extends JModelLegacy
{
/**
* Method to auto-populate the model state.
*
* Note. Calling getState in this method will result in recursion.
*
* @return void
*
* @since 1.6
*/
protected function populateState()
{
$app = JFactory::getApplication();

$input = $app->input;
$method = $input->getMethod();

$credentials = array(
'username' => $input->$method->get('username', '', 'USERNAME'),
'password' => $input->$method->get('passwd', '', 'RAW'),
'secretkey' => $input->$method->get('secretkey', '', 'RAW'),
);
$this->setState('credentials', $credentials);

// Check for return URL from the request first.
if ($return = $input->$method->get('return', '', 'BASE64'))
{
$return = base64_decode($return);

if (!JUri::isInternal($return))
{
$return = '';
}
}

// Set the return URL if empty.
if (empty($return))
{
$return = 'index.php';

 problem rozwiązany należy zmienić plik login.php - można przegrać go ze starszej wersji joomla

Search