summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2010-08-18 12:43:13 +0200
committerKurt Zenker <kz@openoffice.org>2010-08-18 12:43:13 +0200
commit584fdc1a31a0a04e02ec8806c334fd0b0bfd4a58 (patch)
tree51c65cc88254386f39db9954c7c530be5b48fe61 /filter
parente0371acd5ee4ace8956474d5b7c724ef4c46a28a (diff)
parent284ee8838d76f1f2d9db52a8b3f70876daba97ad (diff)
CWS-TOOLING: integrate CWS mav56
Diffstat (limited to 'filter')
-rw-r--r--filter/source/xsltdialog/xmlfilterjar.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/filter/source/xsltdialog/xmlfilterjar.cxx b/filter/source/xsltdialog/xmlfilterjar.cxx
index 5592c331713f..0a01310b3b40 100644
--- a/filter/source/xsltdialog/xmlfilterjar.cxx
+++ b/filter/source/xsltdialog/xmlfilterjar.cxx
@@ -101,6 +101,10 @@ static OUString encodeZipUri( const OUString& rURI )
static Reference< XInterface > addFolder( Reference< XInterface >& xRootFolder, Reference< XSingleServiceFactory >& xFactory, const OUString& rName ) throw( Exception )
{
+ if ( rName.equals( OUString( RTL_CONSTASCII_USTRINGPARAM( ".." ) ) )
+ || rName.equals( OUString( RTL_CONSTASCII_USTRINGPARAM( "." ) ) ) )
+ throw lang::IllegalArgumentException();
+
Sequence< Any > aArgs(1);
aArgs[0] <<= (sal_Bool)sal_True;
@@ -362,6 +366,10 @@ bool XMLFilterJarHelper::copyFile( Reference< XHierarchicalNameAccess > xIfc, OU
{
OUString szPackagePath( encodeZipUri( rURL.copy( sVndSunStarPackage.getLength() ) ) );
+ if ( ::comphelper::OStorageHelper::PathHasSegment( szPackagePath, OUString( RTL_CONSTASCII_USTRINGPARAM( ".." ) ) )
+ || ::comphelper::OStorageHelper::PathHasSegment( szPackagePath, OUString( RTL_CONSTASCII_USTRINGPARAM( "." ) ) ) )
+ throw lang::IllegalArgumentException();
+
if( xIfc->hasByHierarchicalName( szPackagePath ) )
{
Reference< XActiveDataSink > xFileEntry;