Move ip_hash to secret vault and rename it to "true_ip".
/gold: Ensure user should be allowed to see a comment.

This fixes an information disclosure vulnerability reported by Jordan
Milne (/u/largenocream).
GET_oldinfo: prevent info leak via redirect to permalink.

Given the ID36, it was possible to get the title-slug and subreddit of a
submission in a private subreddit.  This adds a missing permissions
check to fix that.

This fixes an information disclosure vulnerability reported by Jordan
Milne (/u/largenocream).
Use HTML5 doctype for MediaEmbedBody.
Start adding credentials to media embed iframe URLs.

By knowing the ID36 of a link, it is possible to see its media embed
because the embed request is served off-domain and as a result can't
verify the user's cookie.  To fix this, we add an authentication code to
the iframe URL for media embeds and require its presence for all embeds
in private subreddits.

This starts appending credentials to private subreddit embeds such that
when the latter half of the fix is deployed all apps are already
generating appropriate embed URLs.

This is part of a fix for an information disclosure vulnerability
reported by Jordan Milne (/u/largenocream).
Require credentials for private subreddit media embeds.

By knowing the ID36 of a link, it is possible to see its media embed
because the embed request is served off-domain and as a result can't
verify the user's cookie.  To fix this, we add an authentication code to
the iframe URL for media embeds and require its presence for all embeds
in private subreddits.

This makes required the credentials which were added in an earlier
patch.

This fixes an information disclosure vulnerability reported by Jordan
Milne (/u/largenocream).
Add MessagesByAccount index.

Useful for quickly finding all messages ever created by an account.