Commit Graph

5183 Commits

Author SHA1 Message Date
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
Brian Simpson
74a2f6ca28 Disable the sidebar for the Over18 page. 2014-12-03 07:28:54 -05:00
Brian Simpson
c2f08f8eed Override sendreplies preference when a comment response is distinguished. 2014-12-03 07:28:48 -05:00
powerlanguage
31f464b74c Add redditgifts exchange support to contact page. 2014-12-03 15:18:56 -08:00
Brian Simpson
5b2da30b11 Allow disabling inbox replies to comments. 2014-12-02 16:22:59 -05:00
Neil Williams
7842cb7553 vote: Add {Link,Comment}VoteDetailsByDay CFs.
We want to ditch the postgres-based vote relations as they are not being
used for much right now and make a large ops burden as they use a
massive amount of space.

These column families should take care of one of the last unserved use
cases for votes: day-based data dumps: the about page shows a count of
votes day-to-day, and some awards use yesterday's votes to determine
winners.

I've chosen to use Pacific time because that's when award cron jobs run
and is generally still how we think about "day"s since we're here in SF.
2014-12-02 13:14:14 -08:00
Matt Lee
12ca92807c markdown: Fix issues with new markdown styles.
Based on feedback from the /r/modnews post:

* font sizes are now em based, and respect browser default font size preferences
* grey text for blockquote and del elements is darker, meets AA accesibility guidelines
* bold/italics style combinations fixed
* removed larger font sizes for wiki pages
* reduced a lot of the margins and altered some of the line-heights.  pages should be
  more compact vertically

This should make the markdown styles respect users' browser
preferences better.
2014-12-02 12:26:29 -08:00
xiongchiamiov
cafaa52a8d Language modal: fix on login page
In reddit/reddit@c4f5b6c2, we accidentally broke the language-selector modal
that appears in the top-right when logged-out (when logged-in language is
changed from your preferences).  The `<div>` that gets popped up snuck up
inside one of the many if-statements in that section, which resulted in it not
getting added to the html on pages where we want to hide the login modal link
(currently only login pages).  This restores it, so you can once again change
your language while on /login.
2014-12-02 12:03:09 -08:00
Brian Simpson
84b09e7636 RedditGiftsController: run giftmessage through _force_unicode. 2014-12-02 14:38:52 -05:00
Matt Lee
1e4f9d7b6e Add class to body when old markdown styles are used.
Last change needed to allow for a smooth transition between old and new styles.
This lets stylesheet authors target any styles needed for backwards-compatibility
to 'body.old-markdown'.
2014-12-02 11:04:43 -08:00
Matt Lee
1291e88974 self-serve: Remove feature flag for 'keep open' feature. 2014-12-02 11:04:42 -08:00
Matt Lee
939761a598 self-serve: Remember user's requested bid and dates when keeping campaign editor open. 2014-12-02 11:04:42 -08:00
Matt Lee
8d7ae9cc3b self-serve: Fix house ad creation. 2014-12-02 11:04:42 -08:00
Matt Lee
44afd8e446 self-serve: Fix campaign bid calculation on frontend.
Fixes a rounding error causing the UI to sometimes display an inaccurate
maximum campaign size.
2014-12-02 11:04:42 -08:00
Matt Lee
7c52cb01d3 Pretty print impressions. 2014-12-02 11:04:40 -08:00
Matt Lee
efa6195e85 Fix long date ranges possibly using an extra day in inventory calculations. 2014-12-02 11:04:39 -08:00
Matt Lee
a4b9572fb7 Fix campaign editor label width. 2014-12-02 11:04:39 -08:00
Matt Lee
4a4265a3ee Add Campaign Creator component. 2014-12-02 11:04:39 -08:00
Matt Lee
0e7dac4a99 Add React.js 2014-12-02 11:04:38 -08:00
David Wick
6d73de35f9 Add option to create a campaign without closing the editor
Stop gap solution until multiple targets can be added for a single
campaign.  Allows people to set up many similar campaigns without
having to start again from scratch.
2014-12-02 11:04:38 -08:00