Skip to content
Snippets Groups Projects
user avatar
Jared Hancock authored
If a file is attached via email and sent into the system, and a file is on
record with the same signature (hash) and size, the system will not save the
file. Instead, the key of the existing file would be found and used instead.

This patch fixes a bug in AttachmentFile::save. The key was generated for
the new file; however, if it was determined to be a duplicate, the key of
the existing file was not returned. Therefore generated key, which wasn't
saved to the database, was returned. Therefore, the wrong key was placed in
the body of the message with cid:<key> for inline images, although that key
would not exist in the database.

This patch correctly returns the existing key from the ::save() method
for de-duplicated files.
c13c330c
Name Last commit Last update
..
client
fpdf
i18n
mpdf
pear
plugins
staff
upgrader
.htaccess
JSON.php
PasswordHash.php
Spyc.php
ajax.config.php
ajax.content.php
ajax.draft.php
ajax.forms.php
ajax.kbase.php
ajax.reports.php
ajax.tickets.php
ajax.tips.php
ajax.upgrader.php
ajax.users.php
api.cron.php
api.tickets.php
class.ajax.php
class.api.php
class.attachment.php
class.auth.php
class.banlist.php
class.base32.php
class.canned.php
class.captcha.php
class.category.php
class.client.php
class.collaborator.php
class.company.php
class.config.php
class.cron.php
class.crypto.php
class.csrf.php
class.dept.php
class.dispatcher.php
class.draft.php
class.dynamic_forms.php
class.email.php
class.error.php
class.export.php
class.faq.php
class.file.php
class.filter.php
class.format.php
class.forms.php
class.group.php
class.http.php
class.i18n.php
class.json.php
class.lock.php
class.log.php
class.mailer.php
class.mailfetch.php
class.mailparse.php
class.migrater.php
class.misc.php
class.nav.php
class.orm.php
class.osticket.php
class.ostsession.php
class.page.php
class.pagenate.php
class.passwd.php
class.pdf.php
class.plugin.php
class.pop3.php
class.priority.php
class.setup.php
class.signal.php
class.sla.php
class.staff.php
class.team.php
class.template.php
class.thread.php
class.ticket.php
class.timezone.php
class.topic.php
class.upgrader.php
class.user.php
class.usersession.php
class.validator.php
class.variable.php
class.xml.php
class.yaml.php
htmLawed.php
html2text.php
index.php
mysqli.php
ost-sampleconfig.php