]> cat aescling's git repositories - mastodon.git/commitdiff
Do not leak followers count on public pages
authorThibaut Girka <thib@sitedethib.com>
Fri, 28 Dec 2018 17:20:58 +0000 (18:20 +0100)
committerThibG <thib@sitedethib.com>
Fri, 28 Dec 2018 19:05:47 +0000 (20:05 +0100)
Fixes #873

app/views/accounts/_header.html.haml

index a40ecb0d4ccdbcedbb8ac660f5a5d00b13131a8c..3afd2e482538271894b421874abe0965c8bbec98 100644 (file)
@@ -39,5 +39,5 @@
           %strong= number_to_human account.following_count, strip_insignificant_zeros: true
           = t('accounts.following', count: account.following_count)
         = link_to account_followers_url(account) do
-          %strong= number_to_human account.followers_count, strip_insignificant_zeros: true
+          %strong= hide_followers_count(account) ? '-' : (number_to_human account.followers_count, strip_insignificant_zeros: true)
           = t('accounts.followers', count: account.followers_count)