SiT! Bugs

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001948SiT!incidentspublic2014-06-15 16:002014-06-15 16:00
Reporterrepostor 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusnewResolutionopen 
PlatformLinuxOSCentOSOS Version6.4
Product Version3.67 LTS 
Target VersionFixed in Version 
Summary0001948: incident_attachment, does not store the attachment correctly
Descriptionin version 3.65, it worked fine.
But after I applied 3.67, I can no longer upload attachment.

In order to get this working again; I have to manually copy the older version of the file.
So I have a workaround for it...

Here are the changes between 3.65 and 3.67.

[root@tomcat sit]# diff incident_attachments.php ../sit-3.63/incident_attachments.php
5c5
< // Copyright (C) 2010-2012 The Support Incident Tracker Project
---
> // Copyright (C) 2010-2011 The Support Incident Tracker Project
53c53
< $sql .= "VALUES ('public', '" . clean_dbstring(clean_fspath($_FILES['attachment']['name'])) . ", '{$_FILES['attachment']['size']}', '{$sit[2]}', 'user', NOW())";
---
> $sql .= "VALUES ('public', '{$_FILES['attachment']['name']}', '{$_FILES['attachment']['size']}', '{$sit[2]}', 'user', NOW())";
75c75
< "-" . clean_fspath($_FILES['attachment']['name']);
---
> "-".$_FILES['attachment']['name'];
83c83
< trigger_error('Failed creating incident attachment directory.', E_USER_WARNING);
---
> trigger_error('Failed creating incident attachment directory: '.$incident_attachment_fspath, E_USER_WARNING);
87,88c87,88
< $mv = @move_uploaded_file($_FILES['attachment']['tmp_name'], $newfilename);
< if (!$mv) trigger_error('!Error: Problem moving attachment from temp directory', E_USER_WARNING);
---
> $mv = move_uploaded_file($_FILES['attachment']['tmp_name'], $newfilename);
> if (!$mv) trigger_error('!Error: Problem moving attachment from temp directory to: '.$newfilename, E_USER_WARNING);
[root@tomcat sit]# mv incident_attachments.php incident_attachments.php.367
[root@tomcat sit]# cp -p ../sit-3.63/incident_attachments.php .

Regards Tomas
Steps To Reproducenot sure how your environment differs from my, but I did this:
1. create an incident
2. I selected "files" on the incident
3. I selected "browse" button
4. I selected a file -> OK
5. I selected "attach file"

The file gets attached; but no name of the file.
Only size; date, etc.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2014-06-15 16:00 repostor New Issue


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker