View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0029148 | Plugin - EmailReporting | General | public | 2021-10-07 03:40 | 2021-11-11 12:14 |
Reporter | jensberke | Assigned To | SL-Gundam | ||
Priority | normal | Severity | crash | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 0.10.1 | ||||
Summary | 0029148: Attachments with long filenames crash the import and new tickets for the same email weill be created in an endless loop | ||||
Description | Column "filename" in "mantis_bug_file_table" has, as some other columns in this table, a limit of 250 characters. An email containing an attachment with a file name longer than this will caused the following error: Database query failed. Error received from database was #1406: Data too long for column 'filename' at row 1 for the query: INSERT INTO mantis_bug_file_table The result of this is the following situation: And this results in an endless loop: the next time EmailReport is started, the email is fetched again, a new ticket is created again and the attachment causes the error again. | ||||
Steps To Reproduce | Create a file with more than 250 characters, e.g. the following one, which has 255 characters: 12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901.txt Attach the file to an email, send it to the email address configured in the EmailReporting plugin and the error will occur. A real-life use-case where a too long file name causes this error is this one: I receive an email from someone with a subject containing more than 250 characters. | ||||
Additional Information | The Mantis core also doesn't deal with this error yet, which I reported as 0029144. Two ideas for a solution: 1. 2. | ||||
Tags | No tags attached. | ||||
1. 2. |
|
Thanks a lot, that was quick :) As for my suggestion 2: I'm not familiar with the Mantis API available for plugins, but wouldn't it be possible to resolve these endless loops for all kinds of exceptions like this? In pseudo-code:
That's not transactional as in "database transaction", but would at least manually clean up as much as possible. |
|
That's an option yes. The problem with it would be that some users do not log the EmailReporting output. And don't check it. A loop would be noticed. A cleanup after would hide the issue and might cause it to be hidden for days or even weeks. If we run into situations where a loop is triggered i'd much rather it be as clear as possible so that users report it and we can quickly fix it and make sure EmailReporting deals with it properly. |
|
Ah yes, good point. Thanks for your feedback. |
|
this plugin not sending emails to none registered users?? please help me in this regard.. |
|
Please report a new ticket or start a new thread on the forum |
|