Commit Graph

4019 Commits

Author SHA1 Message Date
Jason Harvey
dfdc5600c4 Pass fullname on deleted things if we're admin. 2014-02-12 14:51:12 -08:00
Andre D
1ecb6c6a61 wiki: Remove recursion and fix wiki page list filtering. 2014-02-12 14:47:44 -08:00
Neil Williams
47a677aba1 /tb/: Check permissions before redirecting.
When the user is not logged in or has the toolbar disabled, the toolbar
endpoint will turn a link ID36 into a redirect to the submission on
reddit.  This redirect includes the slugified title of the post as well
as the subreddit it's in which could lead to a leak of information from
a private subreddit.

This fixes an information disclosure vulnerability reported by Jordan
Milne (/u/largenocream).
2014-02-12 14:28:07 -08:00
Neil Williams
497751dc96 /api/generate_payment_blob: Check comment viewing permissions.
This is not strictly necessary as /gold/creditgild is where the
information leak actually occurs, but checking here should help prevent
future leaks of the same type.

This fixes an information disclosure vulnerability reported by Jordan
Milne (/u/largenocream).
2014-02-12 14:28:07 -08:00
Neil Williams
4d9e6b29b3 /gold/creditgild: Check comment viewing permissions.
Previously, it was possible to generate a payment blob for a comment the
user does not have permission to view (in a private subreddit or
deleted) and then use the creditgild form to see the author and content
of the comment.  This adds a check to creditgild to ensure correct
permissions at display time.

This fixes an information disclosure vulnerability reported by Jordan
Milne (/u/largenocream).
2014-02-12 14:28:07 -08:00
Chad Birch
510aafede7 User lists: highlight row on hover 2014-02-11 17:30:10 -07:00
Chad Birch
441ce8fe19 Flair list: restrict access to mods (flair perms) 2014-02-11 17:30:04 -07:00
Keith Mitchell
fadfbb6a82 Allow "script" apps grant_type=password
Only application devs will be permitted to use password grants,
to discourage widespread use. Password grants are intended
to be a convenience for bots & personal scripts, to encourage
use of OAuth tokens and ease transition to OAuth2.

For more info on password grants, see:
http://tools.ietf.org/html/rfc6749#section-4.3
2014-02-10 15:42:12 -08:00
Keith Mitchell
3c49e94f97 Add app 'type' field to app create form
This will allow for differing handling of permissions based
on application type.

* Web app: Web-hosted application. Can keep a client_secret

* Installed app: e.g., android app. Client secret is not so secret
See also: https://developers.google.com/accounts/docs/OAuth2InstalledApp

* Script: For simple scripts and bots. Client secret is assumed secret.
2014-02-10 15:42:05 -08:00
Neil Williams
58c66fbbcf V*OrAdminSecret: check modhash if secret token not used.
It is necessary to do this check in V*OrAdminSecret as we cannot (and
should not) require a modhash when the secret token is being used
because this would break API compatibility and isn't necessary.

This fixes two XSRF vulnerabilities reported by Jordan Milne
(/u/largenocream).
2014-02-10 10:58:20 -08:00
Neil Williams
94d69f59ab Remove obsolete /api/frame and /api/noframe endpoints.
These endpoints don't appear to have been used since
reddit/reddit@a07c576d1a and I have
verified via haproxy logs that they are not ever being called.

This fixes two XSRF vulnerabilities reported by Jordan Milne
(/u/largenocream).
2014-02-10 10:58:20 -08:00
Neil Williams
1cbc59a1c5 Add some missing VModhash checks.
This fixes nine XSRF vulnerabilities reported by Jordan Milne
(/u/largenocream).
2014-02-10 10:58:20 -08:00
Brian Simpson
e27f7d3285 paypal subscription: cleanly exit on duplicate transactions. 2014-02-05 12:27:27 -05:00
Brian Simpson
0feb71228a Delete update_promos_q.
A cron job is sufficient because promote.make_daily_promotions()
is all that needs to be run.
2014-02-05 12:27:27 -05:00
Brian Simpson
9dff58335d Delete unused Link _saved and _hidden methods. 2014-02-05 12:27:27 -05:00
Brian Simpson
4082b76a24 Delete SaveHide. 2014-02-05 12:27:27 -05:00
Chad Birch
c9ab064c2a Gold purchase amount dropdowns: reduce choices 2014-02-05 12:27:27 -05:00
Brian Simpson
0a183a1ec2 _min_daily_pageviews_by_sr: get_time_points takes datetime arguments. 2014-02-05 12:22:51 -05:00
Brian Simpson
92eea5fe18 ipn: protect against exceptions raised by send_system_message.
/u/reddit's inbox can get full.
2014-02-05 12:22:51 -05:00
Brian Simpson
de11fbad59 IpnController: cleanly exit if payment_blob is locked.
/u/reddit's inbox was full causing IpnController.finish to fail
on send_system_message, but after dishing out the gold. Temporarily
ignore "locked" payment_blobs.
2014-02-05 12:22:46 -05:00
Chad Birch
bf246afa8d Gold: support buying and redeeming gift codes 2014-02-05 12:20:35 -05:00
Brian Simpson
3072b6e8f3 CoinbaseController: add support for discounted prices. 2014-02-05 12:20:31 -05:00
Neil Williams
e0cc4b1834 Fix reference to RTL stylesheets. 2014-02-04 10:36:31 -08:00
Keith Mitchell
4292e17004 OAuth2: Give /api/morechildren "read" scope 2014-02-03 17:04:21 -08:00
Keith Mitchell
c446ef23f3 /dev/api: Add short docstrings to wiki API endpoints 2014-02-03 17:04:13 -08:00
Keith Mitchell
5f75aa4f31 /dev/api: Correct wiki URLs 2014-02-03 17:04:06 -08:00
Keith Mitchell
5b75c402e2 Add OAuth2 scopes to WikiController endpoints 2014-02-03 17:03:56 -08:00
Keith Mitchell
ad3ffa0cef Remove route for non-existing /api/wiki/create 2014-02-03 17:03:41 -08:00
Keith Mitchell
5e1df19a62 /dev/api: Add missing wiki endpoints 2014-02-03 17:03:34 -08:00
Keith Mitchell
18050f2cb2 Add modwiki and wikiedit OAuth2 scopes
modwiki: Perform moderator-level wiki actions
wikiedit: Edit wiki pages where you have permission to edit
2014-02-03 17:03:28 -08:00
Keith Mitchell
3f5fdf6c92 Add "read" scope to /random 2014-02-03 17:03:21 -08:00
Neil Williams
6a1f1d7d29 thing: Make it possible to use different cache pools per type. 2014-02-03 11:05:31 -08:00
Neil Williams
0dad5e1ccd thing: Remove dead code. 2014-02-03 11:05:31 -08:00
Neil Williams
bc7b9382bb thing: Clean up imports. 2014-02-03 11:05:31 -08:00
Neil Williams
943a1c16d6 Get rid of r2.config.cache.
It's just a strange alias for g.cache.
2014-02-03 11:05:31 -08:00
Ricky Ramirez
8636f1be3e comment_tree: Double MAX_ITERATIONS. 2014-01-30 14:41:35 -08:00
Andre D
ca272316e2 toolbar: Fix embed for offsite subdomains like blog. 2014-01-30 13:23:02 -08:00
powerlanguage
49d25b7767 /rules: Fix broken link for child pornography definition. 2014-01-28 18:14:55 -08:00
Andre D
453a876b30 /contact: Add a link to /r/ideasfortheadmins. 2014-01-28 16:27:22 -08:00
Chad Birch
6934846b52 User page: add moderated subreddits to sidebar 2014-01-28 16:23:42 -08:00
Chad Birch
ea9cbe8c2e User about.json: return 404 for spam users 2014-01-28 16:23:37 -08:00
Neil Williams
7693869580 example.ini: Reorganize and document configuration options. 2014-01-28 13:56:19 -08:00
Neil Williams
b38412fc17 CSS Editor: add a gilded comment to the preview samples.
This should make it a little easier to style gilded comments.

As requested by /u/Tiante in http://redd.it/1vw52s.
2014-01-28 10:11:45 -08:00
Neil Williams
8395f24fc8 Add client-side code for websockets and add message types.
Message types allow dispatch of different payload types to different
receivers.
2014-01-27 15:12:25 -08:00
Keith Mitchell
0ac25c3608 Fix unicode issue in /s/ redirect 2014-01-27 12:05:38 -08:00
Keith Mitchell
088ca2894a minor import cleanup in toolbar.py 2014-01-27 12:05:30 -08:00
Keith Mitchell
cb692abe46 Remove one layer of redirection from /:urloid 2014-01-27 12:05:25 -08:00
Keith Mitchell
e8eb760079 Redirect /s/ to /submit or /tb/
Much code removed, as we no longer need to
handle /s/ generating toolbar views
2014-01-27 12:05:19 -08:00
Keith Mitchell
53822fea07 Fix 'Disallow:' clause 2014-01-27 12:04:11 -08:00
Keith Mitchell
7c3d21ad02 Remove old restriction on msnbot 2014-01-27 12:04:03 -08:00