1. 23 Dec, 2020 1 commit
    • peterh-gr's avatar
      Set allowed origin header for onion hosts · 81529a62
      peterh-gr authored
      In order to let us use fetch with credentials (to send cookies), the
      allowed origin needs to match the URL for the site using fetch. So if
      the request is coming from an onion URL, then assume it's from the onion
      donate site.
      81529a62
  2. 11 Dec, 2020 1 commit
  3. 21 Oct, 2020 3 commits
  4. 02 Oct, 2020 2 commits
  5. 30 Sep, 2020 1 commit
    • Stephanie Kirtiadi's avatar
      Allow cryptocurrency thank you redirect to adopt localOptions · 3fd8b4c7
      Stephanie Kirtiadi authored
      Part of porting the site to lektor site, cryptocurrency page
      is going to be on the lektor site. To allow flexibility of
      where people are going to be redirected after the submission,
      this code is put into place. key pair 'cryptocurrencyThankyouUrl'
      => '/cryptocurrency/thank-you' needs to be added in $localOptions
      in private/settings.local.php on the donate server for local
      settings.
      
      Issue #48280
      3fd8b4c7
  6. 28 Sep, 2020 1 commit
    • peterh-gr's avatar
      Added Lektor error pages for Civi mailing links · b4056e56
      peterh-gr authored
      If a user clicks on a link like an optout or unsubscribe link in a
      CiviCRM mailing and then there's some issue with the unsubscribe, we
      need to show them some errors, so we need to send them back to the
      lektor site because we aren't going to have any display pages on the
      donate site once the Lektor pages go live.
      
      Issue #48285
      b4056e56
  7. 26 Sep, 2020 1 commit
  8. 16 Sep, 2020 1 commit
    • peterh-gr's avatar
      Error handling fixes · 76d4ac33
      peterh-gr authored
      With moving the form to a different website we need to have some
      Access-Control headers set or the browser will block fetch requests.
      Slim doesn't apply the middleware when it's handling the response
      object for errors, so the middleware wasn't adding these headers so the
      browser was blocking the error results.
      
      The PHP errors are handled with a separate error handler so I had to
      repeat everything for those as well so that PHP errors will also get
      handled correctly.
      
      Issue #48541
      76d4ac33
  9. 11 Sep, 2020 3 commits
  10. 19 Aug, 2020 2 commits
  11. 22 Jul, 2020 1 commit
    • peterh-gr's avatar
      Reduced timespan for subscription limit · 9468fabb
      peterh-gr authored
      Reduced the timespan for subscriptions from a single IP address to 1
      hour. This increases the amount of subscriptions per IP address to 10
      per hour instead of 10 per 6 hours. We get a lot of subscription
      requests from specific Tor exit points and we think those are
      legitimate, so we don't want to block them.
      
      Issue #47628
      9468fabb
  12. 14 May, 2020 1 commit
    • peterh-gr's avatar
      Only do IP rate limiting if no other errors · c090f91a
      peterh-gr authored
      We don't really care if they pound the page with incorrect captcha or other
      fields, so let's only check the IP rate limit if they fill out the fields
      correctly. That way we don't get as many errors emailed to us.
      c090f91a
  13. 11 May, 2020 1 commit
    • peterh-gr's avatar
      Added captcha to subscription form · de457a63
      peterh-gr authored
      We've been getting what we think is a lot of spam from one of the Tor exit
      nodes, so we want to try a captcha on the subscription page to see if it calms
      down.
      
      Issue #46281
      de457a63
  14. 04 May, 2020 1 commit
    • peterh-gr's avatar
      Added a counter for subscription requests · fff600d9
      peterh-gr authored
      We're getting a ton of subscription request errors from the rate limiter
      and they seem to be coming from a Tor exit node. I'm curious to see how
      many of these are getting confirmed to get some idea about whether these
      are legitimate requests or not.
      fff600d9
  15. 04 Feb, 2020 2 commits
    • peterh-gr's avatar
      Turned off campaign totals fetching · fcd30b04
      peterh-gr authored
      The campaign is over for this year, so we can shut off the constant
      campaign totals fetching. They complained last year when I didn't shut
      it off.
      fcd30b04
    • peterh-gr's avatar
      Added subscription details to limiter error · 465154fb
      peterh-gr authored
      We're actually getting results that indicate someone is sending lots of
      requests to the /subscription-request thing. I want to print out more
      details in the log to see if we can get an idea if this is legitimate
      traffic or not.
      
      Issue #44700
      465154fb
  16. 23 Jan, 2020 2 commits
    • peterh-gr's avatar
      Fixed bug that let rate be exceeded · 631e9009
      peterh-gr authored
      If you started the rate limiter for an IP address and then let it sit
      for awhile, you could get the $allowance to build up over the rate
      limit for a small amount of time.
      
      Issue #44827
      631e9009
    • peterh-gr's avatar
      Rate limit number of subscription requests · 60a1b33d
      peterh-gr authored
      An attacker could use the /subscribe form to send tons of emails to
      anyone's email address. We want to limit that so it doesn't cause
      problem. This limits it to 10 emails per 6 hours. It's actually doing it
      by rate, so once you hit the limit of 10, then you can send another one
      about 36 minutes after that and keep sending one every 36 minutes.
      
      Issue #44700
      60a1b33d
  17. 22 Jan, 2020 1 commit
    • peterh-gr's avatar
      Added ip-address-middleware for rate limiting · 723f2af7
      peterh-gr authored
      We need to be able to get the IP address for the request. I wanted to
      use a library so that we can handle the case where the app gets moved
      behind a proxy. Right now the ip-address-middleware is configured to
      ignore the proxy (X-Forwarded-For) addresses because client can spoof
      those, but if we do put it behind a proxy then we can trust the header
      (assuming the proxy is configured correctly) and we just need to change
      the arguments to the constructor in src/middleware.php to adjust for the
      proxy.
      723f2af7
  18. 31 Dec, 2019 1 commit
  19. 28 Dec, 2019 1 commit
  20. 23 Dec, 2019 1 commit
  21. 04 Dec, 2019 2 commits
  22. 27 Nov, 2019 7 commits
  23. 26 Nov, 2019 3 commits