View Issue Details

IDProjectCategoryView StatusLast Update
0003076OXID eShop (all versions)4.07. Source code, Testpublic2012-12-10 13:44
Reportermbrotzeller Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version4.5.0 revision 34568 
Fixed in Version4.5.2 revision 38481 
Summary0003076: oxemail deliberately breaks attachments
Descriptionphpmailer supports sending files as email attachments with a different name.
oxemail overwrites the getter for the attachment array and mangles the filename and the tmpname in such a way that even a derived class cannot fix the damage.

we have a form for registration that allows users to upload a file that should go directly to the shop owner instead of being stored on the webserver. the only way to do that with oxemail was to move the file first to its original (possibly non-unique) filename and then mail it, or bequeathe either oxemail and duplicate all functions that access PHPMailer::attachment (since it's private there) or bequeathe phpmailer and duplicate the "Mailer" setting logic that tries to read SMTP settings from oxshops.
Steps To ReproduceAdd one form to a page of the shop, try to use oxemail to send a file from the form as attachment to the shop owner under the original filename without copying the file around first.
Additional Informationthere are a couple of

try{<call parent class methods>}
catch(Exception $e) {}

in oxemail that make it even harder to figure out what goes wrong
TagsNo tags attached.
ThemeBoth
BrowserAll
PHP Versionany
Database Versionany

Activities

svetlana

2011-08-17 16:55

reporter   ~0005051

@developers please investigate it

arvydas_vapsva

2011-08-23 10:09

reporter   ~0005087

Yes, your notice about path is good and we fixed it. But i dont think its a bad idea to use try/catch blocks. In case you need to get these exceptions you can easily bypass oxemail functionality by writing own module and calling original methods like:

PHPMailer::addAttachment( $sAttPath, $sAttFile = '', $sEncoding = 'base64', $sType = 'application/octet-stream' )