summaryrefslogtreecommitdiff
path: root/pgweb
AgeCommit message (Collapse)Author
2025-07-02Do full email validation in oauth signup formMagnus Hagander
These fields aren't editable anyway, but if we don't do the full validation we will instead crash if for example the same account creation form is submitted twice (happens surprisingly often). Now we will instead show a validation error message.
2025-06-16Show cauth version field in django overview pageMagnus Hagander
2025-06-12Make oauthexceptions be http status 400 on signup as wellMagnus Hagander
This was already done for the majority on signin, but for new accounts we should do the same.
2025-06-11Set status 400 on oauth exceptionsMagnus Hagander
It's not always entirely correct, but it's less wrong than 200.
2025-06-11Ensure oauth secure cookie expiresMagnus Hagander
If login isn't completed in 10 minutes, expire the cookie and require a start-over.
2025-06-11Use encrypted cookie instead of session for oauth state dataMagnus Hagander
During oauth logins we need to store some temporary data related to the users session. Previously we did this in the django session, but thanks to AI bots trying millions of logins every day (and never completing the process) we end up with many abandoned sessions in the db. To work around this, instead store the temporary data in an encrypted cookie passed to the browser. Since this cookie can be limited in scope to just the auth part of the site, the slightly larger cookie size doesn't matter, and we don't need to store any data at all server-side.
2025-06-11Use POST when sending to third party oauthMagnus Hagander
Instead of prepopulating a GET request that could generate a session, createa a form with different submit buttons and use that. In the brave new world of AI bots, nobody cares about robots.txt anymore, so we'd get hit by a lot of requests specifically for these logins that were then thrown away because they couldn't log in on the third party site.
2025-06-11Use base64.urlsafe_b64encode() instead of manual specification of charsMagnus Hagander
This makes for better readability, and is exactly the same functionality... Pointed out by Jacob Champion
2025-06-11Implement authenticated encryption in community authMagnus Hagander
This creates a community auth version 3 (previous one being 2, and 1 is long gone) trhat uses AES_SIV as the encryption method instead of regular AES_CBC, and validates the digests on all accounts. As this gets deployed on servers incrementall, the version has to be specified in the database record for the site. We could have the site indicate this itself, but doing it this way seems safer as it will then just break for any app that accidentally reverts the plugin. Reviewed by Jacob Champion
2025-01-15Add a help text indicating where the "contributions" field is usedMagnus Hagander
Per discussion among moderators
2025-01-07Add a page listing recognised NPOs.Dave Page
2024-08-12Update "contributors" test fixture to match site languageJonathan S. Katz
Author: Christoph Berg <myon@debian.org>
2024-06-20Add governance directory pagejconway2
Create a new governance directory page which centralizes access to the various existing pages for project governance teams and committees. In passing, also move some content from the wiki to their own pg.o pages (committers, sysadmins), and create non-existing pages (contributors committee). There are undoubtedly some missed opportunities here for general improvement as well as other unmentioned governance groups, but this is a good start.
2024-05-22PostgreSQL 17 feature matrixJonathan S. Katz
2024-05-08Update force_text -> force_str for Django 4.2Magnus Hagander
2024-05-08Make URL configurations compatible with django 4.2Magnus Hagander
2024-02-01Re-organise sponsor listings, adding financial sponsors per core discussion.Dave Page
Moving forwards we'll have three types of sponsors: - Contributing - those that the sponsor team are responsible for. - Financial - those who donate to an NPO. - Servers - those who provide servers/infrastructure. For the financial sponsors, there are a few rules: - "NPO" means a recognised NPO, (which includes SPI and PGCA). - Each NPO may choose whether or not to list any sponsors on this page. - Each NPO may define the criteria under which sponsors are listed, and any levels they wish to use. - Conference/event sponsorship does not count; it must be sponsorship of the organisation itself. - Sponsors may be listed once under each NPO they have donated to. Note that the same sponsor may be listed in any or all of the categories (contributing, financial, servers). Patch by myself and Jonathan.
2024-01-02Fix order of keywords in SQL scriptMagnus Hagander
Clearly not properly tested. Reported by Akshat Jaimini, found by the testing harness
2023-12-17Make the foreig key from last login table be ON DELETE CASCADEMagnus Hagander
Since this one is not managed inside Django, it doesn't know what to do with it when deleting, so just make postgres handle it.
2023-10-22Add "firstRelDate" to versions.jsonJonathan S. Katz
We have this info available in the Version field and on the website, so making it available in a machine-readably way simplifies allowing people to access this data in a scriptable way. Author: Corey Huinker <corey.huinker@gmail.com>
2023-06-26Twitter apiv2 requiets json format inputMagnus Hagander
Missed that in updating the endpoint.
2023-06-26Print full error message of twitter failuresMagnus Hagander
2023-06-26Update twitter posting api to use v2Magnus Hagander
Only the v2 API is free now. Let's hope the fix is to just switch to that version, and possibly re-generate tokens (this has worked for other systems).
2023-06-06Temporarily comment out links to slack signup, since it doesn't workMagnus Hagander
Once someone has fixed the signups, we should of course re-enable it, but "no link" is better than a broken link.
2023-05-24Add PostgreSQL 16 to the feature matrixJonathan S. Katz
2023-05-04Don't look at developer docs when getting released release notesMagnus Hagander
This could cause a crash when the devel version of the docs had a placeholder entry for a major version that had not yet been released.
2023-05-04Move variable assignments to correct levelMagnus Hagander
Fixes redirect from "naked major version" URLs when major version is 2-digit.
2023-05-04Fix copy/paste for .0 versions of 3-digit version numbersMagnus Hagander
2023-05-04Refactor release notes renderingMagnus Hagander
Move to use core_version for more information, making some purges easier and more predictable as well. Just create a hardcoded list of versions prior to what we have real version entries for, it's just a couple that we need to reference old release notes for (pre-6.3), so it simplifies a lot. Fixes (again) the release notes purging to use xkeys as set, which was accidentally and partially undone in ac618d1b. Generally makes the code easier to read and fixes a few cornercases. Templates also much simplified, with the list template accidentally already committed as part of 19682de8. Reviewed-by: Jonathan Katz
2023-04-11Make names in community auth uniqueMagnus Hagander
Technically not needed for the system, but confusion is ensured if you have two different sites with the same name...
2023-03-17Add links to the CommitFest applicationJonathan S. Katz
There were no direct links to the CommitFest application from the developers section, even though CommitFest are a key part of PostgreSQL development. This adds said links, and provides a brief explanation of what CommitFest are. Reviewed-by: Magnus Hagander <magnus@hagander.net>
2023-03-06Update community Slack links again to fix invite procedureJonathan S. Katz
eccfb71c did not correctly invite people who were not in the allow-listed domains. This uses a "shared join" link that allows this to occur. This is considered a temporary fix to ensure new users can still sign up for the community Slack account. A future commit will direct people to a better solution. Reported-by: Stephen Frost <sfrost@snowman.net>
2023-02-21Allow unsafe-inline styling on SVG images in docsMagnus Hagander
We already allow it on the docs pages themselves, but not on images served up. Seems it can't get worse, and hopefully this fixes the reported issues. Reported by: Peter Geoghegan
2023-02-21Nicer error message when consent form is messed withMagnus Hagander
Instead of an exception complaining about bad style URLs, just ensure that the URL for the next parameter is always relative. (The form for consent can only be triggered via one redirect, and it always has the parameter relative). We did the right thing before (as in, did not perform a redirect), but the error dump was not nice.
2023-02-21Limit community auth usersearch to 100 resultsMagnus Hagander
Avoids huge resultsets and we should never deal with searches bigger than this anyway.
2023-02-09Purge the release notes cache when a minor version is updatedJonathan S. Katz
Typically this required a user (especially the committer) to manually do this step, which was easily and often missed. This limits user error and ensures the release notes are available to users in a timely manner. Reviewed-by: Magnus Hagander <magnus@hagander.net>
2023-01-30Improve searchability of contributor admin viewJonathan S. Katz
This adds search fields (name, handle), a filter for contributor type, and default ordering options to make it easier to navigate this list in the admin panel.
2023-01-30Allow admin manager of contributors to use user autocompleteJonathan S. Katz
This adds a permission check in the user admin view logic to allow someone administrating contributors to use the autocomplete functionality even if the user does not have permission to modify the users directly.
2023-01-10Update community Slack linksJonathan S. Katz
This pointed at a previous resource used to moderate sign-in that has sinced been removed. Author: Melih Mutlu <m.melihmutlu@gmail.com> Author: Jonathan Katz <jonathan.katz@excoventures.com>
2022-12-15Allow deletion of draft news articlesMagnus Hagander
When somebody posts a news article, make it possible to delete it before it's submitted to moderation (or after it's been withdrawn or bounced), instead of forcing the user to leave it around ForEver (TM). Do this by adding some generic functionality for confirmation popups, that can also be used for other things in the future.
2022-07-15Fix some historic indentation mistakesMagnus Hagander
2022-06-20Store the git hash of developer docs loadedMagnus Hagander
This will require some further updates on the loading side of things before it's fully valid, but for now track and show a link to the git hash used to build developer docs *if* one is specified. We only track it for devel (because releases have release numbers) and we only show it in the cases where we would already show the loading time.
2022-05-14Add PostgreSQL 15 to the feature matrixJonathan S. Katz
2022-04-08Properly return http status 201 when creating subscriptionMagnus Hagander
2022-03-24Change equality operator from bash to posix shAndreas 'ads' Scherbaum
The == operator is Bash specific, and since the script isn't Bash specific the = operator should be used instead. Author: Andreas 'ads' Scherbaum <ads@pgug.de> Reviewed-by: Daniel Gustafsson <daniel@yesql.se> Discussion: https://postgr.es/m/671fc8a3-8106-be8d-d6a6-325e19b8358f@pgug.de
2022-03-23Fix unsupported version warning on security pageJonathan S. Katz
This has probably not worked since 0cb56d93, but this patch will allow for the warning to appear.
2022-03-21Add canonical page references to documentationJonathan S. Katz
This sets the documentation pages to use the "/docs/current/" prefix to be the canonical docs. This follows SEO guidance to help improve which doc pages show up higher in search, per: https://developers.google.com/search/docs/advanced/crawling/consolidate-duplicate-urls Reviewed-by: Magnus Hagander <magnus@hagander.net> Reviewed-by: Andres Freund <andres@anarazel.de>
2022-03-07Add an endpoint letting a community auth site subscribe to updatesMagnus Hagander
When a user logs into a community auth site, that account is automatically subscribed to receive updates from the system whenever any changes are made to the user, such as name/email/ssh keys. However, when a site imports a user without them being directly logging in, that subscription is not set up, so any changes made are lost until the user first logs in. This commnit adds an endpoint to the auth system so that a site can expliciltly request updates are sent about a user. This will create a "fake login" on that site, which will enable the normal system to start sending data. The access to the endpoint is protected with a hmac authentication using the existing community auth key.
2022-02-06Give priority to the "new style" of news links over the oldMagnus Hagander
This affects how we redirect news when tehre's what looks like an "id" number both before and after. For example, the link: 2016-08-11-security-update-release-1688 would previously detect the id as 2017 and redirect to that article, which is obviously wrong. This changes the order so that id-at-the-end is checked first. This instead gives problems for urls that *end* in a year (or other things that looks like an id). This is not ideal, but it's better than before because at least now the links that are being generated *now* are handled the correct way.
2022-01-24Fix/remove userse of dictsort functionMagnus Hagander
As of django 3.2.11 in what's considered a security fix (wouldn't be in our use cases, but could be in others), we can no longer use dictsort on lower() -- doing so returns an empty list. So instead we create a new filter called sort_lower, and use that one fromt he two places where we use the filter. This bug caused the list of translations and yearly reports no the CoC page to become empty. Spotted by Umair Shahid.