Compare commits

..
1 Commits
Author SHA1 Message Date
Hivert Quentin 77408a1c02 packaging(trixie): add debian 13 to packaging 2026-09-21 10:21:39 +02:00
8 changed files with 38 additions and 107 deletions

No files matched your search

+3 -3
View File
@@ -566,7 +566,7 @@ SSLRandomSeed connect builtin
Alias /SOGo.woa/WebServerResources/ /usr/local/lib/GNUstep/SOGo/WebServerResources/
Alias /SOGo/WebServerResources/ /usr/local/lib/GNUstep/SOGo/WebServerResources/
<Directory /usr/lib/GNUstep/SOGo/>
<Directory /usr/lib/x86_64-linux-gnu/GNUstep/SOGo/>
<IfVersion < 2.4>
Order deny,allow
Allow from all
@@ -639,7 +639,7 @@ SSLRandomSeed connect builtin
Alias /SOGo.woa/WebServerResources/ /usr/local/lib/GNUstep/SOGo/WebServerResources/
Alias /SOGo/WebServerResources/ /usr/local/lib/GNUstep/SOGo/WebServerResources/
<Directory /usr/lib/GNUstep/SOGo/>
<Directory /usr/lib/x86_64-linux-gnu/GNUstep/SOGo/>
<IfVersion < 2.4>
Order deny,allow
Allow from all
@@ -709,7 +709,7 @@ SSLRandomSeed connect builtin
SSLCertificateFile /ssl/apache-selfsigned.crt
SSLCertificateKeyFile /ssl/apache-selfsigned.key
<Directory /usr/lib/GNUstep/SOGo/>
<Directory /usr/lib/x86_64-linux-gnu/GNUstep/SOGo/>
<IfVersion < 2.4>
Order deny,allow
Allow from all
+3 -3
View File
@@ -1,9 +1,9 @@
Alias /SOGo.woa/WebServerResources/ \
/usr/lib/GNUstep/SOGo/WebServerResources/
/usr/lib/x86_64-linux-gnu/GNUstep/SOGo/WebServerResources/
Alias /SOGo/WebServerResources/ \
/usr/lib/GNUstep/SOGo/WebServerResources/
/usr/lib/x86_64-linux-gnu/GNUstep/SOGo/WebServerResources/
<Directory /usr/lib/GNUstep/SOGo/>
<Directory /usr/lib/x86_64-linux-gnu/GNUstep/SOGo/>
AllowOverride None
<IfVersion < 2.4>
+7 -68
View File
@@ -1089,75 +1089,14 @@ static int cssEscapingCount;
}
- (NSString *) cleanInvalidHTMLTags {
// Clean HTML invalid tags as reported in https://bugs.sogo.nu/view.php?id=5755 and https://bugs.sogo.nu/view.php?id=6167
// libxml2 (HTML4) sees a standalone empty comment (<!--> or <!--->) as an
// unterminated comment and drops the rest of the document, so remove it.
// Only do it outside of comments: the Outlook "downlevel-revealed" pattern
// <!--[if !mso]><!--> ... <!--<![endif]--> ends its first comment with
// "<!-->", and removing it would hide the content in between.
NSString *result;
unichar *in, *out;
NSUInteger len, i, j, o;
// Clean HTML invalid tags as reported in https://bugs.sogo.nu/view.php?id=5755
NSString *s;
s = [NSString stringWithString: self];
s = [s stringByReplacingOccurrencesOfString:@"<!-->" withString:@""];
s = [s stringByReplacingOccurrencesOfString:@"<!--<!" withString:@"<!--"];
len = [self length];
if (len == 0)
return [NSString string];
// Work on raw buffers: linear time, bounded memory (no per-comment objects)
in = NSZoneMalloc (NULL, len * sizeof (unichar));
out = NSZoneMalloc (NULL, len * sizeof (unichar));
[self getCharacters: in];
i = o = 0;
while (i < len)
{
if (i + 3 < len
&& in[i] == '<' && in[i+1] == '!' && in[i+2] == '-' && in[i+3] == '-')
{
j = i + 4;
if (j < len && in[j] == '>')
{
// <!-->
i = j + 1;
continue;
}
if (j + 1 < len && in[j] == '-' && in[j+1] == '>')
{
// <!--->
i = j + 2;
continue;
}
// Regular comment: keep it untouched up to its end ("-->" or "--!>",
// as libxml2 accepts both), or up to the end if unterminated
while (j < len)
{
if (j + 2 < len && in[j] == '-' && in[j+1] == '-' && in[j+2] == '>')
{
j += 3;
break;
}
if (j + 3 < len && in[j] == '-' && in[j+1] == '-'
&& in[j+2] == '!' && in[j+3] == '>')
{
j += 4;
break;
}
j++;
}
memcpy (out + o, in + i, (j - i) * sizeof (unichar));
o += j - i;
i = j;
}
else
out[o++] = in[i++];
}
result = [NSString stringWithCharacters: out length: o];
NSZoneFree (NULL, in);
NSZoneFree (NULL, out);
return result;
return s;
}
@end
+1 -9
View File
@@ -127,15 +127,7 @@
- (void) test_stringCleanInvalidHTMLTags
{
testEquals([[NSString stringWithString:@"<div>Test<!--></div>"] cleanInvalidHTMLTags], @"<div>Test</div>");
testEquals([[NSString stringWithString:@"<div>Test<!---></div>"] cleanInvalidHTMLTags], @"<div>Test</div>");
testEquals([[NSString stringWithString:@"<div>A<!-->B<!-- c -->C<!-->D</div>"] cleanInvalidHTMLTags], @"<div>AB<!-- c -->CD</div>");
testEquals([[NSString stringWithString:@"<div><!--[if !mso]><span>Test</span><!--<![endif]--></div>"] cleanInvalidHTMLTags], @"<div><!--[if !mso]><span>Test</span><!--<![endif]--></div>");
// Outlook "downlevel-revealed" conditional comment: content must stay visible
testEquals([[NSString stringWithString:@"<a><!--[if !mso]><!--> <div><img src=\"x\"/></div> <!--<![endif]--><!--[if mso]><v:fill/><![endif]--></a>"] cleanInvalidHTMLTags], @"<a><!--[if !mso]><!--> <div><img src=\"x\"/></div> <!--<![endif]--><!--[if mso]><v:fill/><![endif]--></a>");
// libxml2 also ends a comment with "--!>"
testEquals([[NSString stringWithString:@"A<!-- x --!>B<!-->C"] cleanInvalidHTMLTags], @"A<!-- x --!>BC");
// unterminated comment is left as is
testEquals([[NSString stringWithString:@"<div>A<!-- B</div>"] cleanInvalidHTMLTags], @"<div>A<!-- B</div>");
testEquals([[NSString stringWithString:@"<div><!--[if !mso]><span>Test</span><!--<![endif]--></div>"] cleanInvalidHTMLTags], @"<div><!--[if !mso]><span>Test</span><!--[endif]--></div>");
}
- (void) test_stringRemoveHTMLTagsExceptAnchorTags
+1 -1
View File
@@ -1 +1 @@
usr/lib/GNUstep/SOGo/ActiveSync.SOGo
usr/lib/x86_64-linux-gnu/GNUstep/SOGo/ActiveSync.SOGo
+2 -2
View File
@@ -1,2 +1,2 @@
usr/include/GNUstep/*
usr/lib/sogo/lib*.so
/usr/include/x86_64-linux-gnu/GNUstep/*
usr/lib/x86_64-linux-gnu/sogo/lib*.so
+20 -20
View File
@@ -4,24 +4,24 @@ etc/default/sogo
etc/logrotate.d/sogo
etc/sogo/sogo.conf
usr/sbin/*
usr/lib/GNUstep/Frameworks/*
usr/lib/GNUstep/Libraries/*
usr/lib/GNUstep/OCSTypeModels/*
usr/lib/GNUstep/SaxDrivers-4.9/*
usr/lib/GNUstep/SaxMappings/*
usr/lib/GNUstep/WOxElemBuilders-4.9/*
usr/lib/GNUstep/SOGo/Templates
usr/lib/GNUstep/SOGo/WebServerResources
usr/lib/sogo/lib*.so.*
usr/lib/x86_64-linux-gnu/GNUstep/Frameworks/*
usr/lib/x86_64-linux-gnu/GNUstep/Libraries/*
usr/lib/x86_64-linux-gnu/GNUstep/OCSTypeModels/*
usr/lib/x86_64-linux-gnu/GNUstep/SaxDrivers-4.9/*
usr/lib/x86_64-linux-gnu/GNUstep/SaxMappings/*
usr/lib/x86_64-linux-gnu/GNUstep/WOxElemBuilders-4.9/*
usr/lib/x86_64-linux-gnu/GNUstep/SOGo/Templates
usr/lib/x86_64-linux-gnu/GNUstep/SOGo/WebServerResources
usr/lib/x86_64-linux-gnu/sogo/lib*.so.*
usr/share/lintian/*
usr/lib/GNUstep/SOGo/AdministrationUI.SOGo
usr/lib/GNUstep/SOGo/Appointments.SOGo
usr/lib/GNUstep/SOGo/CommonUI.SOGo
usr/lib/GNUstep/SOGo/Contacts.SOGo
usr/lib/GNUstep/SOGo/ContactsUI.SOGo
usr/lib/GNUstep/SOGo/MailPartViewers.SOGo
usr/lib/GNUstep/SOGo/Mailer.SOGo
usr/lib/GNUstep/SOGo/MailerUI.SOGo
usr/lib/GNUstep/SOGo/MainUI.SOGo
usr/lib/GNUstep/SOGo/PreferencesUI.SOGo
usr/lib/GNUstep/SOGo/SchedulerUI.SOGo
usr/lib/x86_64-linux-gnu/GNUstep/SOGo/AdministrationUI.SOGo
usr/lib/x86_64-linux-gnu/GNUstep/SOGo/Appointments.SOGo
usr/lib/x86_64-linux-gnu/GNUstep/SOGo/CommonUI.SOGo
usr/lib/x86_64-linux-gnu/GNUstep/SOGo/Contacts.SOGo
usr/lib/x86_64-linux-gnu/GNUstep/SOGo/ContactsUI.SOGo
usr/lib/x86_64-linux-gnu/GNUstep/SOGo/MailPartViewers.SOGo
usr/lib/x86_64-linux-gnu/GNUstep/SOGo/Mailer.SOGo
usr/lib/x86_64-linux-gnu/GNUstep/SOGo/MailerUI.SOGo
usr/lib/x86_64-linux-gnu/GNUstep/SOGo/MainUI.SOGo
usr/lib/x86_64-linux-gnu/GNUstep/SOGo/PreferencesUI.SOGo
usr/lib/x86_64-linux-gnu/GNUstep/SOGo/SchedulerUI.SOGo
+1 -1
View File
@@ -19,7 +19,7 @@ PATH=/bin:/sbin:/usr/bin:/usr/sbin
case "$1" in
configure)
# update timestamp on imgs,css,js to let apache know the files changed
find /usr/lib/GNUstep/SOGo/WebServerResources -exec touch {} \;
find /usr/lib/x86_64-linux-gnu/GNUstep/SOGo/WebServerResources -exec touch {} \;
# Make example scripts in /usr/share/doc/sogo/ executable
# (they do not really belong there, we are violating Debian