summaryrefslogtreecommitdiff
path: root/django/archives/mailarchives
AgeCommit message (Collapse)Author
14 daysIncrease listsubscriber username field lengthCélestin Matte
This field is populated by pglister_sync, copying information from auth_user.username, which can be up to 150 characters.
14 daysSet a CSP header on all attachmentsMagnus Hagander
2025-06-16Round of since/ and before/ URLs to whole daysMagnus Hagander
Previously we'd generate links for each individual email, when clicking the link on the emails. This generates a huge number of URLs that contain basically the same thing, which has an adverse effect on both caching and (stupid) bots. So round it off to even days which puts at least some level of a cap on it. Also, when a hit comes in that specifies the full hour, redirect it back to the rounded-off value.
2025-06-16Make antispam-protected links also be javascript-triggeredMagnus Hagander
This makes a tiny javascript run to convert it into a POST and then receive that POST. The idea behind this is to remove the links from view of crawlers (hello AI bots!) that completely ignore robots.txt, causing lots of redirect chains on account of logins. We still allow GET requests on those endpoints, as there are external links pointing to them as well as people having scripts. But those are at least to fewer emails than all.
2024-09-24Accept a Message-ID contained in < > charactersJelte Fennema-Nio
At least GMail will show the Message-ID including the < > characters.
2023-08-19Temporary remove Slack linkJonathan S. Katz
This was missed when pgweb@8b420bfd4 was added. Reported-by: Sehrope Sarkuni <sehrope@jackdb.com>
2023-05-16Set a http header indicating which message an attachment came fromMagnus Hagander
When an attachment is downloaded, add the http header X-attached-to-message with the message-id of the message that the attachment belongs to.
2022-12-19Set rel=nofollow on link to "infinite" pagesMagnus Hagander
2022-07-15Use as_bytes() instead of as_string() to generate mboxMagnus Hagander
We're supposed to feed django bytes, and by feeding it a string it got converted bytes->string by the mail end and then string->bytes by django. Which promptly blew up on bad encodings. By keeping it as bytes all the way, the problem is ignored.
2022-06-20Switch to using community authentication for downloading raw messagesMagnus Hagander
Too many browsers have changed the wrong way and doesn't actually prompt people properly, which means they try to log in with a bunch of random things, none of them being "archives/antispam". So instead, send them off to do a community login, now that we have support for this (which was added when we added message re-sending). If the request comes in with the authentication header already on it and it being a valid archives/antispam combination, keep allowing that so we don't break scripts and plugins that we don't have to break.
2022-01-15Allow configuration of upstream pgweb addressMagnus Hagander
Search forms currently point to the hardcoded address of www.postgresql.org. Add a parameter in the settings to make it possible to configure the domain hosting the /search/ function. Originally from Célestin Matte, but in the end not his patch
2021-11-30Allow use of IP ranges for API_CLIENTSCélestin Matte
2021-10-27Allow use of IP ranges for SEARCH_CLIENTSCélestin Matte
Allows the use of IP ranges in CIDR format in the SEARCH_CLIENTS parameter. Individual addresses can still be specified and continue to work like before.
2021-10-23Clean up accidentally commited filesMagnus Hagander
Back in 2018, commit 4d159ca accidentally included unrelated functionality which was not completed. This causes the database to be out of sync with the models defined in the code. This commit reverts those parts that were not supposed to be included and leaves the changes that actually were. The code can be re-added once completed... Spotted by Célestin Matte
2021-05-24Properly quote URL in link to resend an emailMagnus Hagander
The lack of this would result in a 404 for any users who clicked a resend link when (1) they were not logged in, and (2) the messageid cotnained a plus character. This would then end up getting unescaped one too many times in the authentication flow and came out as a space on the other end instead of a plus. Reported by Justin Pryzby (and several others, but Justin was persistant in tracking down good examples)
2021-03-02Replace @postgresql.org with @lists.postgresqql.orgMagnus Hagander
When suggesting which lists people should use first, we should use the recommended name for the list.
2020-10-29Properly quote URL for login redirect in private archivesMagnus Hagander
Without the proper quoting, having a + sign in a message-id would get unquoted to a space before sending the user off to the community authentication, which in turn would then redirect back to the incorrect url. Reported by Noah Misch
2020-10-21Use article:author instead of og:article:authorMagnus Hagander
The specification is a bit unclear on which it should be and completely unclear about what should go in the field, but at least it seems most implementations use article:author rather than og:article:author, so try changing it. Also change og:published_time to be article:published_time.
2020-10-21Add opengraph metatags to messagesMagnus Hagander
This makes for nicer "previews" on for example twitter when posting links. Suggested by Andres Freund
2020-08-11Updaate regexp escaping syntax to please pep8Magnus Hagander
2020-08-11Update exception catching syntax to please pep8Magnus Hagander
2020-07-15Improvements to main lists pageStephen Frost
Rename title above Tips to be about Tips, add paragraph talking about how to Unsubscribe.
2020-06-02Update reference to Archives PolicyJonathan S. Katz
This was pointing to the Wiki page, which was pointing to a different page on .org
2020-04-03Fix rendering of attachments and raw messagesMagnus Hagander
It seems older django implicitly added a bytes() around bytea fields returned from psycopg2. The actual change happened around the python3 move, but django painted over the differences so we didn't realize it needed to be changed.
2020-04-01Update middleware and config for Django 2.2Magnus Hagander
2020-04-01is_authenticated is no longer a callable in newer DjangoMagnus Hagander
2020-04-01Use OneToOne field for unique Foreign KeyMagnus Hagander
2020-04-01Mark all ForeignKeys as on_delete=CASCADEMagnus Hagander
2019-07-13Ensure permissions check on "resend complete"Magnus Hagander
This page just says the resend has completed, but a user having the messageid but subscribed to a *different* list on the same server could leak the existance of the email.
2019-06-20Fix copy/paste errorMagnus Hagander
2019-06-20Don't issue xkey headers for private archivesMagnus Hagander
2019-06-20Remove headers for legacy purgingMagnus Hagander
Now that we use xkey for purging, no need to keep the old headers around.
2019-06-19Re-think rate limiting for resendingMagnus Hagander
The way it was done ended up defeaeting the service sending things right away for people who did *not* violate the rate limit. So instead, keep track of exactly when the last email was sent for each user, and rate-limit based on that.
2019-06-18Implement basic rate limiting for sending emailMagnus Hagander
Per-user limit that says how many seconds must go between each email. Outgoing emails are also delayed by this much (or we'd miss it)
2019-06-18Don't allow duplicate requests for the same email to be resentMagnus Hagander
To the same user, that is.
2019-06-18Add xkey headers to outgoing emailsMagnus Hagander
Instead of just our own x-pglm and x-pgthread, add specific xkey headers. These are used by our Varnish frontends to purge more efficiently. For the time being, leave the older headers in place -- we need to have the entire contents of the cache containing xkey headers before we can start using xkey for purging, and only once that is done we will be able to remove the non-xkey headers.
2019-06-18Implement email resending in the list archivesMagnus Hagander
This allows a logged-in user to get an email delivered to their mailbox, thereby making it easy to reply to even if they haven't got it already (and don't have a MUA capable of handling mbox files). The email body will go out unmodified (including any list headers that are stored in the archives, but this does not include for example the unsubscribe link). Envelope sender is set to one configured in the ini file, and envelope recipient is set to the email address of the user.
2019-06-18Unicode fixes in migrationsMagnus Hagander
Missed in py3 migration
2019-04-02Make sure permissions check on individual messages checks subscriber_accessMagnus Hagander
We already did that check in the list of emails, but not on the individual email.
2019-02-04Pin the navigation bar to the top of the page.Jonathan S. Katz
From user feedback, the scrolling navigation bar would cause problems with readability, especially in larger font views. This keeps the navigation bar pinned to the top, until we can find a way to more easily handle this. In the context of pgarchives, this is one bit of "future-proofing" as we do not currently show the shout box in pgarchives, but may do so in the near future.
2019-01-04Don't crash on authenticaiton with colon in the passwordMagnus Hagander
It's supposed to be archives/antispam, but if a password with an actual colon sign in it was used, it'd crash instead of asking for auth again.
2019-01-04Load stylesheet using link instead of importMagnus Hagander
2019-01-04Get rid of inline javascriptMagnus Hagander
This moves the javascript out to the main.js file like we already had done for the main website. This also removes attempts to use the selectmenu plugin for the dropdown. This has not worked since the new design was put in place, because the appropriate scripts were simply never loaded. As people seems to be happy with that, stop *trying* to load them causing javascript failures on every webpage.
2019-01-04Fix variable reference in thread APIMagnus Hagander
This should never have worked, but as the old python version would leak the last message in the previous loop, it did work. As all messages have the same threadid (when they're on teh same thread), just us the one in the known-existing message instead.
2019-01-04Fix comparison operatorsMagnus Hagander
2019-01-04Fix bad multi-command linesMagnus Hagander
2019-01-04Whitespace fixesMagnus Hagander
2019-01-04Fix indentationMagnus Hagander
Per pep8 warnings, adjust indentation for consistency
2019-01-04Tabs to 4 spacesMagnus Hagander
pep8 standard for indentation
2019-01-04Update django app to python 3Magnus Hagander