[asterisk-bugs] [Asterisk 0014190]: POST files are not truncated

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Jan 13 17:08:40 CST 2009


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=14190 
====================================================================== 
Reported By:                timking
Assigned To:                otherwiseguy
====================================================================== 
Project:                    Asterisk
Issue ID:                   14190
Category:                   Core/HTTP
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     closed
Asterisk Version:           1.6.1-beta4 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): 1.6.1 
SVN Revision (number only!): 167416 
Disclaimer on File?:        N/A 
Request Review:              
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             2009-01-07 11:14 CST
Last Modified:              2009-01-13 17:08 CST
====================================================================== 
Summary:                    POST files are not truncated
Description: 
If you use the POST files facility in 1.6.0.3-rc1 (in pbx/http.c), or
1.6.1-beta4 or the latest revision (in res/res_http_post.c) then the file
to be written is opened O_CREAT | O_WRONLY.

Surely this is wrong - don't you mean O_CREAT | O_WRONLY | O_TRUNC ? As it
is, replacing a long file with a shorter one ends up with the previous
contents on the end.
====================================================================== 

---------------------------------------------------------------------- 
 (0097676) svnbot (reporter) - 2009-01-13 17:08
 http://bugs.digium.com/view.php?id=14190#c97676 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 168588

U   trunk/res/res_http_post.c

------------------------------------------------------------------------
r168588 | twilson | 2009-01-13 17:05:43 -0600 (Tue, 13 Jan 2009) | 5 lines

Fully overwrite a same-named file when uploading

(closes issue http://bugs.digium.com/view.php?id=14190)
Reported by: timking

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=168588 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-01-13 17:08 svnbot         Checkin                                      
2009-01-13 17:08 svnbot         Note Added: 0097676                          
======================================================================




More information about the asterisk-bugs mailing list