Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/pip/requests-2.28.1
Browse files Browse the repository at this point in the history
  • Loading branch information
mlissner committed Jul 7, 2022
2 parents 0951a8c + fd02ccf commit 4684b25
Show file tree
Hide file tree
Showing 22 changed files with 741 additions and 304 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ jobs:
cl/tests/utils.py \
cl/users/management/commands/cl_account_management.py \
cl/users/forms.py \
cl/users/email_handlers.py
cl/users/email_handlers.py \
cl/users/tasks.py
- name: Flynt f-string Formatter
run: >
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ repos:
args: [--line-length=79, --transform-concats]

- repo: https://github.com/psf/black
rev: 22.3.0
rev: 22.6.0
hooks:
- id: black

Expand Down
13 changes: 8 additions & 5 deletions cl/lib/context_processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,12 @@ def inject_email_ban_status(
email_address=email, flag_type=FLAG_TYPES.BACKOFF
)
if backoff_event.exists():
msg = TRANSIENT.get(
backoff_event[0].notification_subtype,
TRANSIENT[EMAIL_NOTIFICATIONS.GENERAL],
)
return {"EMAIL_BAN_PERMANENT": False, "EMAIL_BAN_REASON": msg}
# Only show the failed transient email banner if the backoff event
# is active
if backoff_event[0].under_waiting_period:
msg = TRANSIENT.get(
backoff_event[0].notification_subtype,
TRANSIENT[EMAIL_NOTIFICATIONS.GENERAL],
)
return {"EMAIL_BAN_PERMANENT": False, "EMAIL_BAN_REASON": msg}
return {}
14 changes: 14 additions & 0 deletions cl/opinion_page/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,20 @@ def test_unknown_citation(self) -> None:
)
self.assertStatus(r, HTTP_404_NOT_FOUND)

def test_invalid_page_number_1918(self) -> None:
"""Do we fail gracefully with invalid page numbers?"""
r = self.client.get(
reverse(
"citation_redirector",
kwargs={
"reporter": "f2d",
"volume": "1",
"page": "asdf", # <-- Nasty, nasty hobbits
},
),
)
self.assertStatus(r, HTTP_404_NOT_FOUND)

def test_long_numbers(self) -> None:
"""Do really long WL citations work?"""
r = self.client.get(
Expand Down
2 changes: 1 addition & 1 deletion cl/opinion_page/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@ def citation_handler(
else:
cluster_count = clusters.count()

if cluster_count == 0:
if cluster_count == 0 and page.isdigit():
# Do a second pass for the closest opinion and check if we have
# a page cite that matches -- if it does give the requested opinion
possible_match = (
Expand Down
3 changes: 3 additions & 0 deletions cl/settings/project/email.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@

BCC_EMAIL_ADDRESS = "bcc@free.law"

# Hours after a bounce notification is considered a new failure event
BACKOFF_THRESHOLD = 12

SERVER_EMAIL = "CourtListener <noreply@courtlistener.com>"
DEFAULT_FROM_EMAIL = "CourtListener <noreply@courtlistener.com>"
DEFAULT_ALERTS_EMAIL = "CourtListener Alerts <alerts@courtlistener.com>"
Expand Down
3 changes: 2 additions & 1 deletion cl/simple_pages/templates/includes/terms_history.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<h3 id="versions">Other Versions</h3>

<p>Other versions of these policies can be found in the following locations:</p>
<p>Earlier versions of these policies can be found in the following locations:</p>
<ul>
<li><a href="{% url 'old_terms' '16' %}" rel="nofollow">Between June 15, 2022 and July 7, 2022</a></li>
<li><a href="{% url 'old_terms' '15' %}" rel="nofollow">Between March 14, 2022 and June 15, 2022</a></li>
<li><a href="{% url 'old_terms' '14' %}" rel="nofollow">Between March 30, 2021 and March 14, 2022</a></li>
<li><a href="{% url 'old_terms' '13' %}" rel="nofollow">Between June 11, 2020 and March 30, 2021</a></li>
Expand Down
186 changes: 186 additions & 0 deletions cl/simple_pages/templates/terms/16.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
{% extends "base.html" %}

{% block title %}{{ title }}{% endblock %}

{% block content %}
<div class="col-xs-12">
<h2>Terms and Policies</h2>
</div>

<div class="col-sm-3">
<h4 class="bottom"><a href="#terms">Terms of Service</a></h4>
<h4 class="bottom"><a href="#privacy">Privacy Policy</a></h4>
<h4 class="bottom"><a href="#removal">Removal Policy</a></h4>
<h4 class="bottom"><a href="#copyright">Copyright Policy</a></h4>
<h4 class="bottom"><a href="#opt-out">Tracking Opt Out</a></h4>
<h4 class="bottom"><a href="#versions">Previous Versions</a></h4>
</div>

<div class="col-xs-9">
<h3 id="terms">Terms of Service</h3>

<p class="lead">By accessing, browsing, or using CourtListener.com, you agree the following terms:</p>

<h4>1. We are not your lawyers</h4>

<p>CourtListener.com is not intended to be or to provide legal advice. Any information supplied by CourtListener.com or its operators is intended solely as general guidance on the use of the service, and does not constitute professional or legal advice.
</p>

<h4>2. The service may be unreliable and might simply go away</h4>

<p>We've been here since 2010, but CourtListener.com and Free Law Project shall not be responsible for any delays or interruptions of, or errors or omissions contained in, the service. CourtListener.com may discontinue or alter any aspect of this service, including, but not limited to: (i) restricting the time of availability, (ii) restricting the availability and/or scope of the service, (iii) restricting the amount of use permitted, at CourtListener.com's sole discretion and without prior notice or liability.
</p>

<h4>3. The documents on this site may be unreliably reproduced</h4>
<p>CourtListener.com makes no representations, warranties or covenants regarding, and does not guarantee, the truthfulness, accuracy, relevancy, or reliability of any information or other material that are communicated through, or posted to, the service. You acknowledge that any reliance on information or other material communicated through, or posted to, the service will be at your own risk.
</p>

<h4>4. Usage Restrictions</h4>
<p>You will not use, intentionally or unintentionally, Courtlistener.com or any information derived therefrom in violation of any applicable international, national, federal, state, or local law. You understand that Free Law Project is not a consumer reporting agency under the Fair Credit Reporting Act (“FCRA”) and therefore you agree that you will not use Courtlistener.com and any information derived therefrom: (1) as a factor in establishing an individual’s eligibility for credit, insurance, employment, government benefits, housing, or any other FCRA purpose as specified in 15 U.S.C. § 1681b(a); (2) to generate a “consumer report” as that term is defined under FCRA, 15 U.S.C. § 1681a(d); and (3) in any manner that could result in Free Law becoming subject to FCRA. You are prohibited from using the Service and any information derived therefrom in any unauthorized manner and in furtherance of criminal or illegal activities.</p>

<h4><strong>5. Disclaimer of Warranty</strong></h4>

<p><strong>You agree that use of the service is entirely at your own risk. The service is provided "as is," without warranty of any kind whatsoever, either express or implied, to you or any other person relating in any way to the service, including any part thereof, or any Web site or other content or service that may be accessible directly or indirectly through the service. Without limiting the generality of the foregoing, CourtListener.com disclaims to the maximum extent permitted by law any and all (i) warranties of merchantability or fitness for a particular purpose, (ii) warranties against infringement of any third party intellectual property or proprietary rights, (iii) warranties relating to delays, interruptions, errors or omissions in the service, or any party thereof, (iv) warranties relating to the transmission or delivery of the service, and (v) warranties otherwise related to performance, nonperformance, or other acts or omissions by CourtListener.com or any third party.</strong>
</p>

<h4>6. Limitations of Liability</h4>

<p>This disclaimer of liability applies to any damages or injury caused by any failure or performance, error, omission, interruption, deletion, defect, delay in operation or transmission, computer virus, communication line failure, theft or destruction or unauthorized access to, alteration of, or use of record, whether for breach of contract, tortious behavior, negligence, or under any other cause of action. You specifically acknowledge that the risk of injury from the foregoing rests entirely with you. Neither CourtListener.com nor any of its partners, agents, executives, directors, employees or affiliates shall be liable for any direct, indirect, incidental, special or consequential damages whatsoever arising out of use of this service or inability to again access to or use this service or out of any breach of any warranty. You hereby acknowledge that the provisions of this section shall apply to all content on Courtlistener.com.
</p>

<h4>7. Governing Law and Jurisdiction</h4>
<p>These Terms are governed by and shall be construed in accordance with the laws of the State of California. Any action arising out of or relating to these terms shall be filed only in state or federal courts located in California, and you agree to submit to the personal jurisdiction of such courts for the purpose of litigating any such action.</p>

End of terms.
<p><em>Last modified: June 11, 2020</em></p>


<hr>
<h3 id="privacy">Privacy Policy</h3>

<p>CourtListener does not sell information collected about your visits to this site or usage of this site and will only share such information in the ways explained in this policy. We have never used third party tracking. From 2009 to 2022 we self-hosted the Matomo analytics system so that our user's traffic would not be shared with third parties. In March of 2022, we went further, and stopped tracking users across sites or even pages by switching to <a href="https://plausible.io">Plausible Analytics</a>.
</p>

<p>We do not track you across pages or visits, but we do use <a href="https://plausible.io" target="_blank">Plausible Analytics</a> to collect some information from your computer, and we do log visits. These systems help us identify popular pages, diagnose technical problems, and defend our initiatives against attacks. For example, we collect the following technical information about our visitors:
</p>
<ul>
<li>The website that referred you to our site (via the <a href="http://en.wikipedia.org/wiki/HTTP_referrer">HTTP Referer</a> field)
</li>
<li>The browser software you use, your operating system, and your monitor's resolution
</li>
<li>What country you are from
</li>
<li>Any queries that you made in our search, alert or Atom feeds
</li>
</ul>

<p>Where possible, we delete usage-related logs automatically when they are 12 weeks old. We may share anonymized information collected with academic researchers, and they may publish their research based on that information.
</p>

<p>We do not collect personal information about our visitors unless they register an account. We will store account information unless you ask us to delete your account or delete it yourself.
</p>


<p>We currently share data with the following third parties:</p>
<ul>
<li>
<p>When we have physical hardware, we operate them out of <a href="https://lmi.net">LMI.net's colocation facility</a>. We do not share data with them, but our information is stored in their building and transfers in encrypted form through their network.
</p>
</li>
<li>
<p>We use Amazon, Inc.'s AWS services to store and process data.</p>
</li>
<li>
<p>For the purpose of sending newsletters, we share information with <a href="https://moosend.com/" target="_blank" rel="nofollow">Moosend, Ltd, a subsidiary of Sitecore, Inc</a>.
</p>
</li>
<li>
<p>For the purpose of remote backups, we encrypt all of our files and our entire database and send them to <a href="https://backblaze.com" target="_blank" rel="nofollow">Backblaze, Inc</a>.
</p>
<p>Encryption of our backups is done using <code>AES-256-CTR-Poly1305-AES</code>, via the <a href="https://restic.readthedocs.io/en/latest/index.html" target="_blank" rel="nofollow">restic backup software</a>. This ensures that BackBlaze cannot read this information.
</p>
</li>
<li>
<p>For the purpose of processing transactions, we share information with <a href="https://stripe.com" target="_blank" rel="nofollow">Stripe, Inc.</a> and <a href="https://www.paypal.com" target="_blank" rel="nofollow">PayPal, Inc</a>.
</p>
</li>
<li>
<p>For the purpose of error tracking, we share error and logging information with <a href="https://sentry.com" target="_blank">Sentry, Inc</a>. This information generally does not contain any PII and is purged after 90 days.</p>
</li>
</ul>

<p>Please contact us if you have any complaints or concerns about our privacy policy, or notify the FTC via their <a href="http://www.ftccomplaintassistant.gov">online Complaint Assistant</a>.
</p>

<p><em>Last modified: June 13, 2022</em></p>


<hr>
<h3 id="removal">Removal Policy</h3>

<p>The Board of Directors of <a href="https://free.law/">Free Law Project</a>, the non-profit sponsoring CourtListener, believes that there is a compelling public interest in making the law broadly available to all. In pursuit of this goal, we have poured our energies into making CourtListener.com the best free legal research tool that we can. Occasionally however, there can be competing privacy interests of individuals and organizations. This policy describes the balance that we attempt to strike when thinking about this conflict of interests, and describes our policy for accepting and working with removal requests.
</p>

<p>If you would like a case removed from the results of the major search engines, please <a href="{% url "contact" %}">send us a request using the contact page</a>. You must include links to the pages you would like removed. Upon receiving this request, we will generally block search engines from indexing pages on our site by using the robots HTML meta tag and/or the x-robots-tag HTTP header.
</p>

<p>We will not remove any public document from our database without a court order. If you want information deleted from our site, your only recourse is to get it deleted from the public record and to obtain a court order demanding that we do the same. If you are able to furnish such a court order, we will remove the document from our site. If the court order demands an expungement or redaction, we will typically anonymize or redact cases by replacing names with initials or black boxes, and placing a note at the top of the document explaining the change. We will not make changes to any other documents without a court order that specifically requires that we do so.
</p>

<p>After we have blocked the pages, they will eventually be removed from all search engines, however, as is mentioned above, your case is a public document, and there may be other copies of it on the Internet &ndash; Although <em>we</em> will have blocked the search engines from finding your case, there may be other websites that have copies of it. In addition, we have no control over any search engine, and they may not remove your case from their results for many months, if at all.
</p>

<p>If, after reading the above, you would still like to have a case blocked, so it is not found by search engines, please send your written request as described above. You may also attempt to contact us via email, but we do not guarantee receipt of email communications.
</p>

<p>We might change this policy in the future and make no guarantees that we will keep blocked records in place. Further, all removals not pursuant to a court order are at our sole discretion.
</p>

<p>This policy is similar to the policies of other major sources of free online court opinions, and we hope that we have struck a reasonable balance between both your interests and the public's interest in your case.
</p>

<p><em>Last Modified: August 24, 2017</em></p>


<hr>
<h3 id="copyright">Copyright Policy</h3>

<p>CourtListener.com follows the notice and takedown procedures in the Digital Millennium Copyright Act (DMCA), <a href="https://www.law.cornell.edu/uscode/text/17/512">17 U.S.C. Section 512</a>.
</p>

<p>If you believe content on CourtListener.com violates your copyright, please immediately notify its operators by sending a message with the information described below through the <a href="{% url "contact" %}">contact page</a>. Please use the subject "Copyright" in your message. If CourtListener.com's operators act in response to an infringement notice, they will make a good-faith attempt to contact the person who contributed the content using the most recent email address that person provided to CourtListener.com.
</p>

<p>Under the DMCA, you may be held liable for damages based on material misrepresentations in your infringement notice. You must also make a good-faith evaluation of whether the use of your content is a fair use, because fair uses are not infringing. See <a href="https://www.law.cornell.edu/uscode/text/17/107">17 U.S.C. Section 107</a> and <a href="{% url "view_case" "2937139" "stephanie-lenz-v-universal-music-corp" %}"><em>Lenz v. Universal Music Corp.</em>, No. 13-16106 (9th Cir. Sep. 14, 2015)</a>. If you are not sure if the content you want to report infringes your copyright, you should first contact a lawyer.
</p>

<p>The DMCA requires that all infringement notices must include <strong>all</strong> of the following:</p>
<ol>
<li>A signature of the copyright owner or a person authorized to act on the copyright owner's behalf
</li>
<li>An identification of the copyright claimed to have been infringed
</li>
<li>A description of the nature and location of the material that you claim to infringe your copyright, in sufficient detail to allow CourtListener.com to find and positively identify that material</li>
<li>Your name, address, telephone number, and email address
</li>
<li>A statement that you believe in good faith that the use of the material that you claim to infringe your copyright is not authorized by law, or by the copyright owner or such owner's agent
</li>
<li>A statement, under penalty of perjury, that all of the information contained in your infringement notice is accurate
</li>
<li>A statement, under penalty of perjury, that you are either the copyright owner or a person authorized to act on their behalf.
</li>
</ol>

<p>CourtListener.com will respond to all DMCA-compliant infringement notices, including, as required or appropriate, by removing the offending material or disabling all links to it.
</p>

<p>All received infringement notices may be posted in full to the <a href="https://lumendatabase.org/">Lumen database</a> (previously known as the Chilling Effects Clearinghouse).
</p>

<p><em>Added: 22 February 2016</em></p>

<hr>
{% include "includes/terms_history.html" %}
<p>Thank you for using CourtListener.com.</p>
</div>
{% endblock %}

0 comments on commit 4684b25

Please sign in to comment.