Commit Graph

5309 Commits

Author SHA1 Message Date
David Wick
680dcddc04 Fix text for password field on register.compact not appearing
Strength meter relies css/events from restyled login.  This
ensures it's there before trying to add the meter.
2015-01-12 11:31:28 -08:00
Brian Simpson
ac9b7141b5 Add tracking pixel url in response header for api requests. 2015-01-09 03:04:13 -05:00
Neil Williams
af09fa8dee Update license headers to 2015.
The highlight of each year for me.
2015-01-08 13:35:03 -08:00
David Wick
3a7cee6233 login/register: Add "an" before "account" 2015-01-08 12:59:50 -08:00
David Wick
3f0b7d3f35 Display reason for being flagged 2015-01-08 12:59:42 -08:00
David Wick
f8762d200b Reject fraudulent ads automatically 2015-01-08 12:59:36 -08:00
David Wick
5eca8e81ac Add community_email method 2015-01-08 12:59:23 -08:00
David Wick
705b49f073 Add listing for promotions suspected of fraud 2015-01-08 12:59:23 -08:00
David Wick
0baff564e5 Add a hook for when bids are edited 2015-01-08 12:57:57 -08:00
David Wick
6992ad4f00 Remove fraud checks from public code 2015-01-08 12:57:43 -08:00
David Wick
73d290b065 Log when empty emails are rejected 2015-01-08 12:56:58 -08:00
David Wick
05df5bec12 Centralize fraud email sending
Also provides a generic `Kind` for fraud hooks.
2015-01-08 12:56:50 -08:00
Brian Simpson
b76322f8e4 Add alerts for suspicious selfserve advertising payments. 2015-01-08 12:53:41 -08:00
xiongchiamiov
6b3f4b69de Feature flags: add filtering by gold
While we can always hard-code checks for gold, putting this into the feature
flag system allows us to move things from gold-only to everyone with only a
config change.
2015-01-08 12:19:06 -08:00
Chad Birch
583206cdb2 Username mentions: enable for all users
Removes the requirement to have reddit gold to receive username mentions
in your inbox.
2015-01-08 00:50:50 -07:00
Brian Simpson
ec22bd54f8 Don't allow editing a deleted PromoCampaign. 2015-01-06 14:55:56 -05:00
Brian Simpson
e3f092ac68 message: Add classes to subject text, sender, recipient, and subreddit. 2015-01-06 14:27:39 -05:00
Brian Simpson
0ae5072a91 CoinbaseController: cleanly ignore non-payment events. 2015-01-06 14:27:34 -05:00
MelissaCole
ca60378e87 Remove check for give gold link
The 'give gold' link only appears for comments and posts that can be gilded.
2015-01-07 09:46:10 -08:00
MelissaCole
0055f9a6cd Can reveal identity or write a message in gildings
This allows the option for non-anonymous gildings or to write a message.
Whether the user purchased anonymously or non-anonymously for gildings will
be remembered and applied to future gildings (initializes to False so it's
still anonymous until the user decides to change it).
2015-01-06 19:31:23 -08:00
Neil Williams
e51d9f2f0f Feature flags: Handle logged-out users better.
If specific user accounts were allowed to use a feature, logged-out
users would cause the feature flag check to fail because
UnloggedUser.name exists but raises NotImplementedError.  This makes the
feature-world return None for user if no user is logged in.
2015-01-06 14:28:14 -08:00
Brian Simpson
5863fb6b8f pixel: Use user id36 rather than user name. 2015-01-06 04:01:12 -05:00
xiongchiamiov
94984b78af Robots: allow crawling of mobile pages
We got a message from Google Webmaster Tools letting us know they'd like to
pretend to be a mobile device and crawl our mobile pages, but can't, because we
disallow it in our `robots.txt` rules.  We have canonicalization set up to
point towards desktop pages, so we shouldn't be hurt by allowing this.

We should also at some point provide two-way annotations to let them go from
desktop -> mobile[0], but for now this should suffice.

[0]: https://developers.google.com/webmasters/mobile-sites/mobile-seo/configurations/separate-urls
2015-01-06 12:03:41 -08:00
Chad Birch
9fc5d0f1eb message.new hook: Call before determining rels 2015-01-06 12:49:07 -07:00
Aedx
bca1c9e7a4 Added missing closing head tag 2015-01-06 11:31:53 -08:00
xiongchiamiov
45ab808c44 Flair selector: minor restyling
This is a tiny little touch-up of the flair selector box that just adds a
little more space between things, because I was annoyed at looking at it.  As
far as my choices for things:

* The `.flairselector h2` change was to make it consistent with the other
  dividing lines in the box.
* The button margin was chosen to be consistent with the "add" button on
  /about/moderators.

I decided not to mess with the wonky vertical alignment on the flair because
that gets changed by subreddits' customizations to flair display, so it's
probably not worth it to try and make it look better.
2015-01-05 14:47:52 -08:00
Neil Williams
f95cb2b143 Rework login ratelimit system.
The goal of a login ratelimit system is to prevent brute force attacks
on passwords.

The current login ratelimit system is based on VDelay which uses
exponential backoff based on IP address after failed login attempts.
This is not ideal because of corporate proxies and LSN causing the
number of false positives to be very high resulting in users getting
the dreaded "you've been doing that too much".

This new system uses a factored out version of the core ratelimiting
system which uses fixed ratelimits per period (allowing some burstiness)
and is per-account. To help mitigate the effects of a denial of service
attack on a specific user, different ratelimit buckets are used
depending on whether or not the user has used the IP the login request
is coming from before.

As an escape hatch, successfully resetting an account's password adds
the current IP to that account's recent IPs allowing it into the safer
ratelimit bucket.

The ratelimit never applies if you are currently logged in as the user,
allowing account deletion to happen regardless of ongoing brute force /
denial of service attacks.
2015-01-05 14:06:46 -08:00
Eric
8fdc799564 Change SubredditSelector to use better wording
Currently, the subreddit selector when submitting a new link "/r/subreddit/submit" says "Popular Choices" and then lists the subreddits you are subscribed to.

I find this to be a big misnomer, as they are not popular choices at all, they are just a list of your subscribed subreddits. "Popular choices" implies that these are things other people have selected as well.

I know, it's super nitpicky, but I thought it might make more sense this way.
2015-01-05 16:11:14 -05:00
Brian Simpson
e0d5d77be9 Remove scrollupdater debug statements. 2015-01-05 16:11:08 -05:00
xiongchiamiov
d53b2a0d6b RSS feeds: fix timestamp
[Reported by][0] /u/josh64.

When the message RSS feeds were created, they erroneously had an extra timezone
appended to the `dc:date` element, which causes validation errors.

In most of the feeds we rely only upon `pubDate`; it's not clear to me why we
additionally use `dc:date` in the few places we do, but I suppose it doesn't
hurt anything.  The other two places using it are `subreddit.xml`, which never
had the extra timezone, and `comment.xml`, in which it was removed three years
ago (reddit/reddit@5675398).  This fixes the last incorrect instance.

Note: Although the reporter says they got an error in the W3C validator and the
format is clearly wrong, in my tests the validator passed the previous,
incorrect feed. *shrug*

[0]: http://redd.it/2r1plf
2015-01-05 11:24:57 -08:00
Jordan Milne
f7d53fbd91 Display points on XHR'd compact pages 2014-12-31 17:43:56 -04:00
Jordan Milne
159c51b2b4 Enforce floor of 0 on link scores across render styles
Thanks to @iKevinY for the report. Fixes #1205
2014-12-31 17:43:53 -04:00
Brian Simpson
4cfbf59af5 Update thing.recipient to thing.user_is_recipient in message.compact. 2014-12-30 19:18:33 -05:00
Brian Simpson
8d90f8be2c Message: don't distinguish author of parent comment. 2014-12-30 19:18:33 -05:00
Brian Simpson
586cc18f71 Messages: always show "from" first. 2014-12-30 19:18:33 -05:00
Brian Simpson
eb0cdbf25c Make messages from user as subreddit more visually distinct.
Previously they looked like a regular message sent from the current
user. Now they indicate they are sent via a subreddit.
2014-12-30 19:18:33 -05:00
Brian Simpson
d2fa4b5364 Message.add_props: detangle logic. 2014-12-30 19:18:33 -05:00
Brian Simpson
7f84f427fc Message.add_props: Use mods_by_srid to find user moderated subreddits. 2014-12-30 19:18:33 -05:00
Brian Simpson
74815d273d Message.add_props: Run set_unread in batch. 2014-12-30 19:18:33 -05:00
Brian Simpson
eef29e4e09 Message.add_props: Batch lookups of override to and author. 2014-12-30 19:18:33 -05:00
Brian Simpson
d30f121f92 Message.add_props: Clean up batch lookups. 2014-12-30 19:18:32 -05:00
Brian Simpson
f55a8dcce5 Message.add_props: Don't use c.user.
Use `user` which is passed into the function.
2014-12-30 19:18:32 -05:00
Brian Simpson
701a292f7c Message: stop setting message_style attribute. 2014-12-30 19:18:32 -05:00
Brian Simpson
188bb28008 Message.add_props: Clean up variables. 2014-12-30 19:18:32 -05:00
Neil Williams
c01ac9eb9c Revert "Ratelimits: add strict enforcement mode."
This reverts commit 6b73de5dd5758d7a6df07ad85668af21afb510f8.
2014-12-30 15:43:03 -08:00
xiongchiamiov
1fb11a187c Profile page: enable comment editing
Giving users the ability to edit their own comments from their user page is
something that RES adds, but we didn't because the data wasn't available or
something.  Someone [brought it up again][0] recently, and it turns out it
*just works* now if we enable it.  And I don't see a good reason to prevent
users from doing it.

[0]: https://www.reddit.com/r/AutoModerator/comments/2olykv/automoderators_flair_and_karma_have_been_wiped/cmoiz4j?context=1
2014-12-29 14:19:03 -08:00
Ricky Ramirez
14a554d10b TransitionalCache: Correct return value for set ops. 2014-12-26 12:21:36 -08:00
Jordan Milne
29777e10f4 Switch to rel="noreferrer" instead of window.open() where possible
I've made a huge mistake
2014-12-22 17:45:49 -04:00
Brian Simpson
15c0a6344f Share: remove recent emails saving. 2014-12-19 21:41:55 -05:00
Brian Simpson
9f3456c485 ShareEmail: Don't link to comments page when promo comments disabled. 2014-12-19 21:41:55 -05:00