Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix broken file upload for downloadables caused by PATCH SUPEE-11314 #1048

Merged

Conversation

theroch
Copy link
Contributor

@theroch theroch commented Jun 18, 2020

Removed session params from upload URL to allow file uploads for downloadable products.

Signed-off-by: Frank Rochlitzer f.rochlitzer@b3-it.de

 * Removed session params from upload URL

Signed-off-by: Frank Rochlitzer <f.rochlitzer@b3-it.de>
@theroch
Copy link
Contributor Author

theroch commented Jun 18, 2020

Caused by app/code/core/Mage/Admin/Model/Session.php:109->127

/**
 * Logout user if was logged not from admin
 */
protected function logoutIndirect()
{
    $user = $this->getUser();
    if ($user) {
        $extraData = $user->getExtra();
        if (
            !is_null(Mage::app()->getRequest()->getParam('SID'))
            && !$this->allowAdminSid()
            || isset($extraData['indirect_login'])
            && $this->getIndirectLogin()
        ) {
            $this->unsetData('user');
            $this->setIndirectLogin(false);
        }
    }
}

!$this->allowAdminSid() is always true.

The Links.php and Samples.php added the SID param to all upload URLs. So it was no more possible to upload any files for downloads.

@sreichel sreichel added SUPEE Relates to security patches Component: Downloadable Relates to Mage_Downloadable labels Jun 19, 2020
@sreichel sreichel modified the milestone: Release 19.4.6 Jun 26, 2020
@sprankhub
Copy link
Contributor

sprankhub commented Jun 29, 2020

Thanks for the fix, @theroch.

I can confirm that this fixes the issue. Since Magento seems to have abandoned SIDs in the administration area, this should also not have any security implications IMHO.

@colinmollenhour colinmollenhour merged commit 951c0c7 into OpenMage:1.9.4.x Jul 6, 2020
@sreichel sreichel added this to the Release 20.0.1 / 19.4.5 milestone Aug 7, 2020
edannenberg pushed a commit to edannenberg/magento-lts that referenced this pull request Aug 20, 2020
edannenberg pushed a commit to edannenberg/magento-lts that referenced this pull request Aug 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Downloadable Relates to Mage_Downloadable SUPEE Relates to security patches
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants