From 18593cf75189c0d6d3cbbf729013c875398218ca Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 29 Oct 2014 16:32:42 +0100 Subject: Only support Translation-* that are listed in the {In,}Release file Handle Translation-* files exactly like Packages files (with the expection that it is ok if a download of them fails). Remove all "guessing" on apts side. This will elimimnate a bunch of errors releated to captive portals and similar. Its also more correct and removes another potential attack vector. --- .../test-bug-595691-empty-and-broken-archive-files | 10 ---------- test/integration/test-bug-624218-Translation-file-handling | 11 ++--------- 2 files changed, 2 insertions(+), 19 deletions(-) (limited to 'test/integration') diff --git a/test/integration/test-bug-595691-empty-and-broken-archive-files b/test/integration/test-bug-595691-empty-and-broken-archive-files index fedf82c92..bca07268c 100755 --- a/test/integration/test-bug-595691-empty-and-broken-archive-files +++ b/test/integration/test-bug-595691-empty-and-broken-archive-files @@ -73,16 +73,6 @@ E: Some index files failed to download. They have been ignored, or old ones used testoverhttp() { forcecompressor "$1" - createemptyfile 'en' - testaptgetupdate "Get: http://localhost:8080 Packages [] -Get: http://localhost:8080 Translation-en -Reading package lists..." "empty file en.$COMPRESS over http" - - createemptyarchive 'en' - testaptgetupdate "Get: http://localhost:8080 Packages [] -Get: http://localhost:8080 Translation-en [] -Reading package lists..." "empty archive en.$COMPRESS over http" - createemptyarchive 'Packages' testaptgetupdate "Get: http://localhost:8080 Packages [] Reading package lists..." "empty archive Packages.$COMPRESS over http" diff --git a/test/integration/test-bug-624218-Translation-file-handling b/test/integration/test-bug-624218-Translation-file-handling index d3c5b08ac..4ec30ee09 100755 --- a/test/integration/test-bug-624218-Translation-file-handling +++ b/test/integration/test-bug-624218-Translation-file-handling @@ -47,16 +47,9 @@ translationslisted() { translationslisted 'with full Index' -# only compressed files available (as it happens on CD-ROM) -sed -i '/i18n\/Translation-[^.]*$/ d' $(find aptarchive -name 'Release') -signreleasefiles - -translationslisted 'with partial Index' - - # no records at all about Translation files (fallback to guessing) -sed -i '/i18n\/Translation-.*$/ d' $(find aptarchive -name 'Release') -signreleasefiles +find aptarchive -name 'Release' -or -name 'InRelease' | xargs rm -f +configallowinsecurerepositories "true"; msgtest 'Download of en as forced language' 'without Index' aptget update -o Acquire::Languages=en | grep -q -e 'Translation-en ' && msgpass || msgfail -- cgit v1.2.3 From 7933b3a1cf56096d6ab30cedf1b736054b5fc84b Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 5 Nov 2014 17:28:13 +0100 Subject: test/integration/test-bug-624218-Translation-file-handling: clarify when Translation-* is guessed --- test/integration/test-bug-624218-Translation-file-handling | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test/integration') diff --git a/test/integration/test-bug-624218-Translation-file-handling b/test/integration/test-bug-624218-Translation-file-handling index 4ec30ee09..d32bd513b 100755 --- a/test/integration/test-bug-624218-Translation-file-handling +++ b/test/integration/test-bug-624218-Translation-file-handling @@ -47,7 +47,8 @@ translationslisted() { translationslisted 'with full Index' -# no records at all about Translation files (fallback to guessing) +# No Release file at all, so no records about Translation files +# (fallback to guessing) find aptarchive -name 'Release' -or -name 'InRelease' | xargs rm -f configallowinsecurerepositories "true"; -- cgit v1.2.3