Commit Graph

5202 Commits

Author SHA1 Message Date
Brian Simpson
81b5ebbbce Distinguish mod receiver in modmail.
Previously the receiving user's name was just black text. The recent
change to link the name to the profile page made regular users and
mods look too similar, causing confusion.
2014-12-11 15:12:27 -05:00
Keith Mitchell
b1320c2fc2 Skip CORS in RedditController.post if it's already checked 2014-12-10 13:59:57 -08:00
Keith Mitchell
23b2f78e85 Don't auth for OPTIONS requests on Oauth-only controllers 2014-12-10 13:59:50 -08:00
Keith Mitchell
f1c277cde8 CORS: Update CORS headers for OAuth2 access 2014-12-10 13:59:43 -08:00
Keith Mitchell
92b9fc9c73 OAuth2: Implement implicit grants 2014-12-10 13:59:29 -08:00
Chris Dary
84d39cecf5 Gold checkout: Fix mismerge to reddit/reddit.
An extra branch got added here that was incorrect.
2014-12-10 13:48:20 -08:00
Jordan Milne
add5b0ed83 Store statistics on pagecache hits / misses by endpoint
This way we can tell which endpoints are useful to cache, and which
ones are just needlessly forcing other stuff out of the cache.
2014-12-10 13:48:20 -08:00
Jordan Milne
d877ec0751 Fix a malformed inherit tag in linkinfopage.htmllite 2014-12-10 13:48:20 -08:00
Robert Ditthardt
6ad89f49b2 Memcached: Remove retry extra logging and feature flag 2014-12-10 13:48:20 -08:00
Roger Ostrander
1d4bf69bd9 VoteDetails: Backfill IP addresses for votes < 90 days old 2014-12-10 13:48:20 -08:00
Robert Ditthardt
6a8ea7d51c Make feature flags less reliant on pylons 2014-12-10 13:09:19 -08:00
Robert Ditthardt
d6a74a0164 Memcached: Implement retry on failure. 2014-12-10 13:09:19 -08:00
Brian Simpson
19c269a14c Let sponsors lookup users by fullname. 2014-12-10 13:09:19 -08:00
David Wick
be92a6f897 Make advertising rules open in new tab 2014-12-10 13:09:19 -08:00
Brian Simpson
af04006baf click: unquote destination before unmangling query string. 2014-12-10 13:09:19 -08:00
Brian Simpson
966bb14675 Click redirect: fix encoding of destination url.
Some advertisers set their ad's url to an intermediate tracker so
they can independently track clicks. This results in a series of
redirects like this:

reddit tracker > intermediate tracker > final destination

The ad's url is communicated to the reddit tracker through a query
parameter which is urlencoded on reddit.com and then unquoted when
being handled by the reddit tracker. This unquoting causes problems
if there is an intermediate tracker with its own query string
that needs to be urlencoded. This commit adds handling for those query
strings.
2014-12-10 13:09:18 -08:00
Robert Ditthardt
7540117113 Stop negative thing id from reaching the database.
This is extra safety against a bug we can't reproduce anymore where
postgres would hang when very large thing ids were used in queries.
2014-12-10 13:09:18 -08:00
David Wick
63f9c31887 Add autocomplete to multis 2014-12-10 13:09:18 -08:00
Keith Mitchell
543e5a6998 OAuth: Use reasonable max length for device_id 2014-12-10 13:09:18 -08:00
Keith Mitchell
c3ef951879 Add TOO_SHORT / min_length to VLength 2014-12-10 13:09:18 -08:00
Keith Mitchell
63dd2f0c94 OAuth2: Add extension grant for app-only auth
Grant URI: https://oauth.reddit.com/grants/installed_client

This minor extension grant allows non-confidential
OAuth2 clients to request user-less OAuth2 tokens.

Consumers should provide a unique ID, and re-use that ID
for subsequent token requests from the same device. ID
generation is left up to the client.

This is separate from client_credentials so that the
client_credentials grant can conform to the official spec.
2014-12-10 13:09:18 -08:00
umbrae
9c50a08c65 Fix logo href in button embeds to be absolute.
Thanks to @ohmanger in https://github.com/reddit/reddit/pull/1151
2014-12-10 13:09:18 -08:00
umbrae
18bc7ceb7b Load button info with JSONP to avoid CORS HTTPS errors 2014-12-10 13:09:18 -08:00
umbrae
8a0aa2e977 Inbox counts: Only unnotify on comments 2014-12-10 13:09:18 -08:00
umbrae
36691515e8 Update readme for short blurb on contributing 2014-12-10 13:09:18 -08:00
Brian Simpson
9532e12a51 PromoteLinkForm: don't preload any inventory data. 2014-12-10 13:09:18 -08:00
Chad Birch
bea0fdd936 Revert "temp commit - fallback for renamed payment_blob key" 2014-12-10 13:09:18 -08:00
Jason Harvey
de5b9239a6 Revert "Use lang_override for all "en" variants."
Provide an escape from pirate day.

This reverts commit cc3af6e8ff.
2014-12-10 13:09:18 -08:00
Keith Mitchell
90ba5db9f6 OAuth2: Access Token defaults should be strings
The string u'None' was getting saved for some defaults.
2014-12-10 13:09:18 -08:00
Keith Mitchell
91f2fd5d46 OAuth2: Don't make installed apps use secrets
Installed apps are considered "public" as part of the
OAuth2 spec (unable to keep a secret). Don't
show a secret for such apps on the /prefs/apps page,
and don't check the secret as part of client identification
for such apps.
2014-12-10 13:09:18 -08:00
Keith Mitchell
38e2996f7e Docs: Minor update to POST_access_token docstring 2014-12-10 13:09:18 -08:00
Keith Mitchell
2121997713 OAuth2: Application-only OAuth2
This implements the client_credentials grant type.

This allows 3rd parties to use the OAuth domain for
logged out (user-less) API access in addition to existing use for
logged in access.
2014-12-10 13:09:18 -08:00
Keith Mitchell
cffc69214b Add VUser() to OAuth only endpoints
In preparation for application-only (non-user) OAuth access.
2014-12-10 13:09:17 -08:00
umbrae
b4f8400952 Enable link attribution on GA clicks 2014-12-10 13:09:17 -08:00
Ricky Ramirez
f1124fd381 cache.py: Enable verify_keys for mc ASCII protocol.
The memcache ASCII protocol is vulnerable to injection attacks, so tell
libmemcached to verify keys are valid before sending them to memcache.
2014-12-10 13:09:17 -08:00
Ricky Ramirez
c7344507f2 Disable binary mode for ratelimitcache. 2014-12-10 13:09:17 -08:00
Ricky Ramirez
1ac22a5d56 Disable binary mode for pagecache. 2014-12-10 13:09:17 -08:00
Jason Harvey
9ed937a1eb Disable binary mode for permacache. 2014-12-10 13:09:17 -08:00
Jason Harvey
d3ce419319 Disable binary mode on rendercache. 2014-12-10 13:09:17 -08:00
Jason Harvey
0cf8b00914 Add arg for binary mode to CMemcache. 2014-12-10 13:09:17 -08:00
Jason Harvey
0a67faa057 Style cleanup. 2014-12-10 13:09:17 -08:00
Chad Birch
915ab3efbc HACK: fix Stripe webhook errors with tokens including dash 2014-12-10 13:09:17 -08:00
Neil Williams
88ba0f3bf0 vote: Refactor vote casting to prepare for pgvote removal.
The intent of this patch is to refactor the existing vote-casting code
into a state that's ready for pgvotes to be dropped and replaced with
reads from VoteDetailsByThing.  Ideally, no behaviour is changed by this
patch (hence "refactor") and then the later data model change will be
lower risk as a result of less code shuffling.

Once this patch is applied, the `Vote` class/rel is considered an
implementation detail of the vote module and hidden from public view.
2014-12-10 12:59:51 -08:00
xiongchiamiov
7ac10dace2 Report form: hide on gold payment page
In reddit/reddit@76858eb, I expanded the places we could use the report form.
Unfortunately, it got caught by a CSS rule on the reddit gold payment page that
made it visible, despite not being at all useful on that page. :)

Now that CSS rule is slightly more scoped.  The only other `<form>` that's
inside `.gold-payment` but **not** `.gold-wrap` is the share dialog, which has
an inline style hiding it.
2014-12-08 14:22:33 -08:00
David Wick
b7cd7e33f1 Add password strength meter 2014-12-08 13:27:57 -08:00
David Wick
c33f0e1622 Add user agreement to registration/login 2014-12-08 13:27:25 -08:00
xiongchiamiov
d2e2cef132 Consistencize account text
To avoid debate over "login" the noun and "log in" the verb, we're making a
move towards using "sign in" instead.  The first part of this was done in the
login rework in reddit/reddit@c4f5b6c2.

This commit continues to make our verbage consistent on "sign in" and "create
an account", avoiding use of "log in" and "register".  Specifically, these
should all be consistent:

* Upper-right modal-popping text
* Headers on modal and /login
* Buttons on modal and /login
* Page title on /login

I didn't change the text in the old login flow, because that feature flag seems
like it's going to be pruned soon.
2014-12-08 13:17:30 -08:00
xiongchiamiov
76858eb99c Reports: show report reasons prompt everywhere
[A user suggestion][0] from /u/wickedplayer494.

Now that the "report reasons" box has gotten some good user testing, use it
everywhere you can report a comment or post.  The only place I could find that
wasn't already doing this was the inbox, with reply notifications.

[0]: https://www.reddit.com/r/bugs/comments/2nq57y/reporting_comments_through_the_inbox_page_does/
2014-12-08 11:47:06 -08:00
Brian Simpson
a3da1c5cc8 Link to receiving user's profile in modmail. 2014-12-04 23:43:57 -05:00
Brian Simpson
6de8a8e538 Add option for sponsors to use redditgifts embeds. 2014-12-04 15:21:11 -05:00