Diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Check both avatar filters through cgit
Only email-gravatar ever ran inside cgit, and nothing there checked
that the icon is fetched without a Referer.
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests/t0504-email-avatar.sh | 12 |
1 file changed, 11 insertions, 1 deletion
diff --git a/tests/t0504-email-avatar.sh b/tests/t0504-email-avatar.sh index dc00426..75dc6da 100755 --- a/tests/t0504-email-avatar.sh +++ b/tests/t0504-email-avatar.sh @@ -55,6 +55,9 @@ test_expect_success 'point cgit at it through the email filter' ' repo.url=avatar repo.path=$PWD/repos/avatar/.git repo.email-filter=lua:$EXTENSIONS_DIRECTORY/email-gravatar.lua + repo.url=libravatar + repo.path=$PWD/repos/avatar/.git + repo.email-filter=lua:$EXTENSIONS_DIRECTORY/email-libravatar.lua EOF ' @@ -63,7 +66,14 @@ test_expect_success 'point cgit at it through the email filter' ' test_expect_success CGIT_LUA_OSSL 'the commit page draws the author icon' ' cgit_ok_url "avatar/commit/" >tmp && test_grep "gravatar.com/avatar/b0eda69977c26118feff17875d53376006568bcbcde5ca0c916d01f05c281436" tmp && - test_grep "loading=.lazy." tmp + test_grep "loading=.lazy." tmp && + test_grep "referrerpolicy=.no-referrer." tmp +' + +test_expect_success CGIT_LUA_OSSL 'the libravatar filter draws it from its own service' ' + cgit_ok_url "libravatar/commit/" >tmp && + test_grep "seccdn.libravatar.org/avatar/b0eda69977c26118feff17875d53376006568bcbcde5ca0c916d01f05c281436" tmp && + test_grep "referrerpolicy=.no-referrer." tmp ' test_expect_success CGIT_LUA 'without luaossl the page keeps the name alone' ' |
