Update of /cvsroot/mahogany/M/src/gui
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4155/src/gui
Modified Files:
wxComposeView.cpp
Log Message:
don't use full path for attachments in Content-Type name parameter
Index: wxComposeView.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxComposeView.cpp,v
retrieving revision 1.362
retrieving revision 1.363
diff -b -u -2 -r1.362 -r1.363
--- wxComposeView.cpp 21 Mar 2004 02:26:11 -0000 1.362
+++ wxComposeView.cpp 17 Jun 2004 22:36:55 -0000 1.363
@@ -3908,5 +3908,9 @@
if ( name.empty() )
{
- name = filename;
+ // use only file name, i.e. without path, because the
+ // receiving MUA discards the path anyhow (for obvious
+ // security reasons) and the user might not like that
+ // we show his local paths in outgoing mail messages
+ name = wxFileNameFromPath(filename);
}
@@ -3914,14 +3918,13 @@
MessageParameter *p;
- // some mailers want "FILENAME" in disposition parameters
- // (where only file name, i.e. without path, should be
- // used for obvious security reasons)
- p = new MessageParameter(_T("FILENAME"),
- wxFileNameFromPath(name));
+ // newer mailers look for "FILENAME" in disposition
+ // parameters according to RFC 2183
+ p = new MessageParameter(_T("FILENAME"), name);
dlist.push_back(p);
- // and some mailers want "NAME" in parameters (we can use
- // the full name here)
- p = new MessageParameter(_T("NAME"), filename);
+ // but some old mailers still use "NAME" in content-type
+ // parameters (per obsolete RFC 1521), so put it there as
+ // well
+ p = new MessageParameter(_T("NAME"), name);
plist.push_back(p);
@@ -3933,5 +3936,6 @@
mt.GetSubType(),
part->GetDisposition(),
- &dlist, &plist
+ &dlist,
+ &plist
);
}
-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates