Commit Graph

4102 Commits

Author SHA1 Message Date
Brian Simpson
74663dbb8f Use an intermediate time recording for "build_morechildren". 2014-02-24 16:33:11 -05:00
Brian Simpson
d0803cdda0 NewController: simplify keep_fn and fix docstring.
Docstring no longer accurately described method's behavior.
2014-02-24 16:31:59 -05:00
Brian Simpson
acccbb8dfb load_subreddits: Don't load 'contributor' SRMembers.
Used for Comment.add_props to see if user can reply to a comment.
That can be looked up if/when it's needed. Also used for
Builder.must_skip to check if the user can view but only if the
Subreddit is private, so also can be looked up when it's needed.
2014-02-24 16:31:59 -05:00
Brian Simpson
4f9bbc8fb2 _fast_query: Delete unimplemented timestamp_optimize option. 2014-02-24 16:31:59 -05:00
Brian Simpson
0da12af82e Relation._fast_query: Fix data and thing lookups.
Don't retrieve data or thing_data in sgm miss function because that
is used only to lookup and cache (thing1_id, thing2_id, name): rel_id.
Also switch to using _byID_rel so we can actually honor the thing_data
and eager_load kwargs.
2014-02-24 16:31:59 -05:00
Brian Simpson
42466db9dd Relation._fast_query: Delete TODO message. 2014-02-24 16:31:59 -05:00
Brian Simpson
0181d4fbc8 load_subreddits: Don't load things on SRMember. 2014-02-24 16:31:59 -05:00
Brian Simpson
0213927a49 load_subreddits: Don't load subscriber SRMember. 2014-02-24 16:31:54 -05:00
Andre D
aa48e9b46c UserListing: Skip deleted users. 2014-02-24 16:31:25 -05:00
Andre D
1c91e67a68 about: Fix /edit and /traffic for logged out users. 2014-02-24 16:31:10 -05:00
Brian Simpson
d74b0baa85 Delete traffic viewers. 2014-02-24 16:30:45 -05:00
Brian Simpson
8df7d74af8 Delete Userlist. 2014-02-24 16:30:45 -05:00
Andre D
9ecb228d53 /about: Paginate banned and contibutors. 2014-02-24 16:30:37 -05:00
Chad Birch
d54e284b74 RSS/XML: actually fix broken default header url 2014-02-21 12:13:57 -08:00
shlurbee
549e26df0d Don't recommend banned subreddits. 2014-02-21 12:13:42 -08:00
Max Goodman
286379e81a install-reddit: Explicitly disallow installing modules from PYPI. 2014-02-20 15:45:21 -08:00
Chad Birch
a25d502d15 Message icons: no orangered on mark-read pages 2014-02-20 16:25:22 -07:00
Chad Birch
1003e73bf1 Password reset: ratelimit by IP 2014-02-20 16:25:18 -07:00
Chad Birch
60c18aec8a RSS/XML: fix broken default header url 2014-02-20 16:25:13 -07:00
Chad Birch
ebae642bf2 Password reset email: update wording 2014-02-20 16:24:55 -07:00
Neil Williams
3393dc07a9 Add MessagesByAccount index.
Useful for quickly finding all messages ever created by an account.
2014-02-18 15:04:40 -08:00
Neil Williams
77fe0dfa3c 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).
2014-02-18 15:04:40 -08:00
Neil Williams
a6063c5843 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).
2014-02-18 15:04:39 -08:00
Neil Williams
45c663e18e Use HTML5 doctype for MediaEmbedBody. 2014-02-18 15:04:39 -08:00
Neil Williams
902288c9e3 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).
2014-02-18 15:04:39 -08:00
Neil Williams
240140ee59 /gold: Ensure user should be allowed to see a comment.
This fixes an information disclosure vulnerability reported by Jordan
Milne (/u/largenocream).
2014-02-18 15:04:39 -08:00
Neil Williams
f8bf988006 Move ip_hash to secret vault and rename it to "true_ip". 2014-02-18 15:04:39 -08:00
Brian Simpson
3aacf8dc05 CommentTree: stop storing num_children.
CommentTreeStorageV2 will continue to store num_children as the
column value, but it is not read.
2014-02-18 06:16:31 -05:00
Brian Simpson
4534e5e05e CommentTree migration: handle permacache entries without num_children. 2014-02-18 06:16:31 -05:00
Brian Simpson
29e11d7692 CommentTree migration: stop using tree.num_children. 2014-02-18 06:16:26 -05:00
Keith Mitchell
b21124432d OAuth2: Give /subreddits/search 'read' scope 2014-02-18 10:54:58 -08:00
Keith Mitchell
172163327c OAuth2: Don't lose redirect_uri query params 2014-02-18 10:54:53 -08:00
Keith Mitchell
b1e97e8bff Bring OAuth2 into the core controllers
This makes it easier to avoid issues with running pre()
functions multiple times (multiply subclassing was causing
problems) and makes it so all resources are blocked from oauth
access unless explicitly enabled (instead of randomly allowing
access as a "logged out user" to endpoints that aren't part of
an OAuth2ResourceController)

Conflicts:

	r2/r2/controllers/apiv1.py
	r2/r2/controllers/oauth2.py
2014-02-18 10:54:49 -08:00
Brian Simpson
d368e31cb4 Ignore 'mispaid' notifications from Coinbase. 2014-02-18 04:22:01 -05:00
Brian Simpson
8db9e76ab0 Fix link to gold subscription page in error message. 2014-02-18 04:22:01 -05:00
Chad Birch
ed1f165756 Gilding form: add reminder message for creddits 2014-02-18 04:21:56 -05:00
Neil Williams
3ed6a33ab8 Comment score hiding: allow users to see their own scores always.
It's just frustrating not to be able to see your own score and the
bandwagon effect isn't really relevant in this case.
2014-02-14 11:36:16 -08:00
Jason Harvey
0e7dee096f Trim the message tree when it reaches a certain size. 2014-02-14 11:36:16 -08:00
Jason Harvey
a06b9682d2 Pass fullname on deleted things if we can ban. 2014-02-14 11:34:21 -08:00
Ricky Ramirez
f66c9e7f0c Add missing commentvisitsbox.xml template. 2014-02-14 10:25:12 -08:00
Keith Mitchell
0e647695d3 /dev/api: Show /api/flairselector docs 2014-02-14 10:04:52 -08:00
powerlanguage
667a863faf Add jobs link to footer 2014-02-13 15:47:22 -08:00
Keith Mitchell
1a117fffbd Remove extra "is_mod" from AccountJsonTemplate
It's already in the IdentityJsonTemplate subclass
2014-02-13 15:26:54 -08:00
Keith Mitchell
a059ef106f OAuth: Include mail status in /api/v1/me
Will only be included if the current scope includes
"privatemessages".
2014-02-13 15:26:48 -08:00
Keith Mitchell
5cf4ee5535 OAuth: Add @extra_oauth2_scope decorator
When in an OAuth context, decorated functions
will only be run if the context includes the designated
scope.

When not in an OAuth context, the function is run normally.
2014-02-13 15:26:41 -08:00
Keith Mitchell
6e08b49780 apiv1.py: Fix whitespace issues 2014-02-13 15:26:36 -08:00
Keith Mitchell
b610af7438 OAuth: ApiV1Controller must check_for_bearer_token 2014-02-13 15:26:26 -08:00
Keith Mitchell
4258d1c036 OAuth2: /api/v1/access_token: Use proper user ID 2014-02-13 15:26:22 -08:00
Keith Mitchell
2de5f2d3ec OAuth2: Add personal "flair" scope
Allows token bearer to manipulate user flair, and
the flair of his submitted links

Give /api/setflairenabled "flair" scope
Give /api/flairselector "flair" scope
2014-02-13 15:26:00 -08:00
Keith Mitchell
4ae88aae40 OAuth2: Add 'report' scope (works for 'hide' too) 2014-02-13 15:25:52 -08:00