4

This is the 3rd time I have seen this on a relatively fresh install of Magento. The only place that the email Hello@example.com exists is in:

System > Configuration > Contacts > Email Options

system.log:

2015-02-03T20:12:11+00:00 ERR (3): Warning: include(Hello@example.com.php): failed to open stream: No such file or directory  in  /chroot/data/******/******/html/lib/Varien/Autoload.php on line 94
2015-02-03T20:12:11+00:00 ERR (3): Warning: include(): Failed opening 'Hello@example.com.php' for inclusion (include_path='/chroot/data/******/******/html/app/code/local:/chroot/data/******/******/html/app/code/community:/chroot/data/******/******/html/app/code/core:/chroot/data/******/******/html/lib:.:/usr/share/pear:/usr/share/php')  in /chroot/data/******/******/html/lib/Varien/Autoload.php on line 94
2015-02-03T20:12:11+00:00 ERR (3): Warning: include(Hello.php): failed to open stream: No such file or directory  in /chroot/data/******/******/html/lib/Varien/Autoload.php on line 94
2015-02-03T20:12:11+00:00 ERR (3): Warning: include(): Failed opening 'Hello.php' for inclusion (include_path='/chroot/data/*******/******/html/app/code/local:/chroot/data/*******/******/html/app/code/community:/chroot/data/*******/******/html/app/code/core:/chroot/data/*******/******/html/lib:.:/usr/share/pear:/usr/share/php')  in /chroot/data/*******/******/html/lib/Varien/Autoload.php on line 94

I'm not sure why the Autoload would be trying to include a file from a config value.

EDIT:

References to "recipient_email":

$ grep -rnw ./ -e "recipient_email"
./public_html/app/code/core/Mage/Contacts/controllers/IndexController.php:37:    const XML_PATH_EMAIL_RECIPIENT  = 'contacts/email/recipient_email';
./public_html/app/code/core/Mage/Contacts/etc/config.xml:98:                <recipient_email><![CDATA[hello@example.com]]></recipient_email>
./public_html/app/code/core/Mage/Contacts/etc/system.xml:67:                        <recipient_email translate="label">
./public_html/app/code/core/Mage/Contacts/etc/system.xml:75:                        </recipient_email>
./public_html/app/code/core/Mage/Core/Model/Resource/Email/Queue.php:81:                array('recipient_email', 'recipient_name', 'email_type')
./public_html/app/code/core/Mage/Core/Model/Resource/Email/Queue.php:94:                $oldEmails[$recipient['recipient_email']] = array(
./public_html/app/code/core/Mage/Core/Model/Resource/Email/Queue.php:95:                    $recipient['recipient_email'], $recipient['recipient_name'], $recipient['email_type']
./public_html/app/code/core/Mage/Core/Model/Resource/Email/Queue.php:129:            ->from($this->getTable('core/email_recipients'), array('recipient_email', 'recipient_name', 'email_type'))
./public_html/app/code/core/Mage/Core/Model/Resource/Email/Queue.php:136:                    $recipient['recipient_email'],
./public_html/app/code/core/Mage/Core/Model/Resource/Email/Queue.php:169:                         'recipient_email' => $email,
./public_html/app/code/core/Mage/Core/sql/core_setup/upgrade-1.6.0.5-1.6.0.6.php:87:    ->addColumn('recipient_email', Varien_Db_Ddl_Table::TYPE_TEXT, 128, array(
./public_html/app/code/core/Mage/Core/sql/core_setup/upgrade-1.6.0.5-1.6.0.6.php:97:    ->addIndex($installer->getIdxName('core/email_recipients', array('recipient_email')),
./public_html/app/code/core/Mage/Core/sql/core_setup/upgrade-1.6.0.5-1.6.0.6.php:98:        array('recipient_email'))
./public_html/app/code/core/Mage/Core/sql/core_setup/upgrade-1.6.0.5-1.6.0.6.php:104:            array('message_id', 'recipient_email', 'email_type'),
./public_html/app/code/core/Mage/Core/sql/core_setup/upgrade-1.6.0.5-1.6.0.6.php:107:        array('message_id', 'recipient_email', 'email_type'),
./public_html/var/*******_magento.sql:4287:  `recipient_email` varchar(128) NOT NULL COMMENT 'Recipient Email',
./public_html/var/*******_magento.sql:4291:  UNIQUE KEY `*******` (`message_id`,`recipient_email`,`email_type`),
./public_html/var/*******_magento.sql:4292:  KEY `IDX_CORE_EMAIL_QUEUE_RECIPIENTS_RECIPIENT_EMAIL` (`recipient_email`),

References to "XML_PATH_EMAIL_RECIPIENT":

$ grep -rnw ./ -e "XML_PATH_EMAIL_RECIPIENT"
./app/code/core/Mage/Contacts/controllers/IndexController.php:37:    const XML_PATH_EMAIL_RECIPIENT  = 'contacts/email/recipient_email';
./app/code/core/Mage/Contacts/controllers/IndexController.php:101:                        Mage::getStoreConfig(self::XML_PATH_EMAIL_RECIPIENT),
  • Can you search your file system for all files which contain recipient_email and see if maybe you have some module assigning that config value to a variable, and then passing it to Mage::getModel or some craziness? – Tyler V. Feb 3 '15 at 23:57
  • I updated the original post with the requested information. – Daniel Smith Feb 4 '15 at 0:03
  • What version of php are you running on the server? – SR_Magento Feb 4 '15 at 0:10
  • PHP version 5.3.24 – Daniel Smith Feb 4 '15 at 0:23
  • That config var gets the constant XML_PATH_EMAIL_RECIPIENT. Can you check where that is being used? – Tyler V. Feb 4 '15 at 0:37
4

In /lib/Varien/Autoload.php above line 94, add the following:

if (strstr($classFile, '@')) {
    try {
        Mage::log(var_export(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS), true), null, 'system.log', true);
    } catch (Exception $e) {}
}

Then hit any page known to cause to Warning in your logs. Then go to /var/log/system.log and look for a debug stack trace. It will start with this:

  0 => 
  array (
    'function' => 'autoload',
    'class' => 'Varien_Autoload',
    'type' => '->',
  ),

From there, you should see what file and method is causing an autoload of this non-existent class.

When you're done, revert Autoload.php

  • 2
    Thanks. I found the issue. It is in a widely used extension and appears to be exploitable. I'm contacting the extension developer to disclose the vulnerability. In short, it has to do with improper use of the is_subclass_of method. – Daniel Smith Feb 4 '15 at 5:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.