Commit Graph

55 Commits

Author SHA1 Message Date
0cb56d9355 Database:ify the list of security patches
This finally moves the patches into the db, which makes it a lot easier
to filter patches in the views.

It also adds the new way of categorising patches, which is assigning
them a CVSSv3 score.

For now, there are no public views to this, and the old static pages
remain. This is so we can backfill all existing security patches before
we make it public.
2018-01-25 21:59:13 +01:00
d0aa8ac119 Remove majordomo2 subscription form
Replace it with a redirect to lists.postgresql.org, where pglister lives.
2018-01-23 21:20:19 +01:00
dfd46afae4 Send -bugs and -docs emails from noreply address
Sending from the submitters address runs afoul to DMARC and other
restrictions. Instead, send the email from a defined noreply address.
Instead, add the original submitter to both the Cc and the Reply-To
header, to make sure they receive followups.

Patch by Stephen, minor changes by Magnus
2017-12-18 15:59:18 +01:00
07345c1458 Remove legacy workaround to support old community auth
This workaround enabled a weaker password hasher to work with old
versions of the community authentication plugin. This was already
overridden in prod, but remove the old workaround completely from the
code so we don't accidentally re-enable it.
2017-12-10 16:40:02 +01:00
2f52c4f7c4 Clean up whitespace in primary Python / HTML files
Clean up the whitespace in the primary Python / HTML files in
order to make it easier to apply changes going forward.
2017-11-29 08:21:35 -05:00
cc8c058857 Split out noreply sender address to separate config parameter
We want to use the noreply@ email address when sending out notifications
to addresses that have yet to be verified, since we can just ignore
bounces to those.
2017-09-27 12:01:45 +02:00
9a77d1747a Implement support for Oauth2 based login integrations
This creates Google, Github, Microsoft and Facebook login integrations.
Other providers can also be added if needed. Accounts still need to be
created in the community auth system, and will be automatically created
on first login, when the user also gets to pick a username. Once an
account exists, it will be matched on email address from the external
systems.

No methods are enabled by default, as they all require encryption keys
and identities configured in local_settings.py.

Review by Stephen Frost, Jonathan Katz and Daniel Gustafsson.
2017-08-28 16:31:57 +02:00
20a0e178c5 Add simple API endpoint to activate and deactivate a list
Access is restricted by IP for the list server. Once the migration is
done, we should probably remove the endpoint again.
2017-07-03 15:35:55 +01:00
0354a5ec0f Remove support for repo updated trigger
This was never actually completed, and we have other ways to deal with
the deployments now that are faster.
2017-06-27 15:14:20 +02:00
d09fde9ba3 Add function to spider reporpms from the yum repo
The ftp server can then submit a list (and structure) of which platforms
are supported for yum downloads, which can then later (in a separate
commit) be used to generate a nicer download for yum repo rpms.
2017-05-24 13:48:04 -04:00
27e1c73368 Implement auto-complete for /admin/ forms that reference User
We have so many users now that loading these forms take forever.
Instead, implement a textbox with autocomplete using django-selectable,
which will not load the whole list of users at once.
2016-06-23 17:59:45 +02:00
319412156e Secure csrf tokens
Since we have no forms over non-http now, make sure the cookies are
locked
2016-05-24 21:14:33 +02:00
3c089cd09a Remove SSL decorators and middleware
The site is now served regardless of SSL, and assumes that the webserver
or web cache ensures that things rae always SSL.
2016-05-24 21:13:00 +02:00
b1ae5f8ec0 Remove workaround for django bug #15152.
This bug is fixed before django 1.8, so remove our workaround which
should now be unnecessary.
2016-05-19 14:23:52 -04:00
2952b39754 Replace interactive docs with docs bug reporting
Per discussion from a long time ago, interactive docs aren't really
working out. The majority of submissions are either support questions
(which then get rejected because they cannot be answered in this
context) or pointing out docs incorrectnesses (which should be submitted
as a docs bug instead, so they can actually be fixed in the main
documentation).

Old references to /interactive/ will get redirected to /static/
automatically, and we expect to keep doing that for a long time (since
there are many links to them around the net).
2016-05-19 10:42:44 -04:00
118b1193b8 Remove pwn module and links
The pwn module has never been used, as the pwn are simply sent to
-announce and nothing else. We've kept the code and model around for
doing it on the site for years now and it's unused, so let's remove it
to cut down on maintenance cost.
2016-05-14 22:17:07 +02:00
6eafeb769a Django no longer ships with buildin markdown
Instead, use django_markwhat, the same as we've done for other
postgreslq.org django projects.
2016-05-14 19:49:12 +02:00
350b936e58 Prefix cross-application imports with pgweb
As required by the new project layout.
2016-05-14 19:49:12 +02:00
498e786c0e Move files and directories for new project layout
Move manage.py up one step, set up a new wsgi.py file, and adjust
relative paths that refer to other directories for the new project
layout that we need to use in django 1.8.
2016-05-14 19:49:12 +02:00
2f8bbc40dd Replace pgq with trivial local queue implementation
The queue used for varnish purges has so few entries that it's really
not worth paying the management overhead for skytools/pgq. Instead we
can use a very simple local deamon using LISTEN/NOTIFY to fire them off.

Now include a proper nagios plugin in this package, so we can get rid
of the not-very-nice munin plugin currently used in the deployment.
2016-05-14 19:49:12 +02:00
aa5a257c71 Implement basic re-captcha handling
I very much hate captchas, but we need something, and using something like
re-captcha for it makes it easy to implement.
2015-12-17 13:37:49 +01:00
596520ba13 Implement workaround for django bug #15152 for badly encoded URLs
Hopefully this will stop the system spamming us..
2014-06-03 09:26:48 +02:00
b39a87fa5f Add API url that drops a trigger file for updates
The idea is a git repository hook will send a POST to this URL, which
will drop a trigger file somewhere. A cronjob (or inotify listener if
we want to be really fancy sometiem in the future) will pick up that
cronjob and run the update script. The goal being to shorten the time
required to process an update.
2014-04-13 14:11:19 +02:00
bfa9b2a105 Track which emails are "user generated" for different antispam treatment
Basically, user generated email (bug report form) will be sent to the mail
frontends for antispam. Any errors generated there will be ignored and
the mails "dropped on the floor". Other emails keep entering the system
through localhost and delivered there.
2014-01-11 20:46:48 +01:00
8f0b7e6b50 Switch email sending go through a queue table in the database
Import the code from the PostgreSQL Europe website to handle this, since it's
well proven by now.

Any points that send email now just write them to the database using the
functions in queuedmail.util. This means we can now submit notification
emails and such things within transactions and have them properly roll bcak
if something goes wrong (so no more incorrect notifications when there is
a database error).

These emails are picked up by a cronjob that runs frequently (typically
once per minute or once every 2 minutes) that submits them to the local
mailserver. By doing it out of line, this gives us a much better way of
dealing with cases where mail delivery is really slow.

The submission from the cronjob is now done with smtp to localhost instead
of opening a pipe to the sendmail command - though this should have no
major effects on anything.

This also removes the setting SUPPRESS_NOTIFICATIONS, as no notifications
are actually ever sent unless the cronjob is run. On development systems
they will just go into the queuedmail table, and can be deleted from there.
2014-01-11 12:33:06 +01:00
48410d04fa Enable cache-busting URLs for CSS and JS
This will allow us to increase the cache times in the browser for our
CSS, which almost never changes.

Enables a new value to be used in templates, {{gitrev}}, which can be
used to bust pretty much any URL. We could do this for all the images
in the templates as well, but since most of them almost never change,
we'll just enable it manually for each individual image as it becomes
necessray - or just use a ?1, ?2 etc for those.

Enabled by default for CSS and JavaScript links, since those are much
more likely to be changed without having the URL changed.

Cache times aren't increased yet - we'll do that later one we're sure
that all existing caches are expired first.
2014-01-01 15:24:51 +01:00
d1535febb9 Make the varnish queue id configurable
This is required if the queue is dropped and recreated in pgq as it
gets a new id, which needs to be used when viewing the current status
of the queue in the admin interface.
2013-09-10 13:54:54 +02:00
fdd1404f37 Get the list of documentation versions out of the database
Instead of having to update this list manually in multiple places when
releasing new versions, just take the information out of the database
where it has to be anyway.

Fixes #90
Closes #93

Also make the code automatically pick up wich PDF files exist in the
static checkout, and auto-detect their size, both A4 and US sizes. This
removes yet one more manual step, yay!

Fixes #163
2013-08-17 17:28:36 +02:00
3ea91f449c Revert to SHA1 hashing for stored passwords
This is required for the old style community auth system that is still
in use by the commitfest app. Once that has been retired or upgraded,
this patch should be reverted.

Existing passwords are automatically converted once the user logs in to
the main website once.
2013-06-20 11:40:13 +02:00
1a04a9c2bd Update contexts and processors for django 1.4
Some requirements from the admin interface are also mandatory now,
so include those.
2013-06-16 16:35:21 +02:00
2ea607b942 Switch to using staticfiles app for serving, well, static files
This is required by the new admin interface
2013-06-16 16:35:21 +02:00
5d608f1fe4 Update db settings for new database config format 2013-06-16 16:35:21 +02:00
ec5b9fa183 Add usergroup listing module
Jonathan Katz
2013-05-08 22:07:30 +02:00
4ccf10540a Reimplement list searching on top of http API
The new archives has a http api - use that one for searching instead
of directly talking to the database.

With the new API, we always fetch the complete search results (still
capped server-side at 1000 items), and store them locally in memcached
for 10 minutes. That way, paging will only hit the local memcached and
not the remote http api *or* the SQL api.
2013-01-12 17:48:09 +01:00
0a69f0b831 Add specific view for handling CSRF failures
This generates the error in a bit nicer way inside our framework,
instead of throwing the default django error.
2012-11-07 20:57:22 +01:00
f6fd1f2e97 Enable CSRF protection by default
Most of these forms look pretty benign, but the user profile form, which
includes an SSH key field, certainly needs to be protected.

The survey form is unprotected because it's served over insecure HTTP
and the Varnish proxy strips cookies, which is required by the builtin
CSRF protection.

Marti Raudsepp
2012-11-05 14:10:39 +01:00
ef711553b9 Add (protected) API to queue varnish purge requests
We want an API for this so they end up in the queue with all the other
requests, and get delivered to all our frontends without needing each node
to know about which frontends exist.
2012-10-03 14:19:28 +02:00
437557acd3 Make our session cookie secure by default, and locked to www.postgresql.org
This increases session security, obviously... It will also break local development
installs, which will have to add the two rows that this patch adds to the
documentation.
2011-12-17 19:40:33 +01:00
758a721405 Allow for the ftpsite pickle to be uploaded via https
Previously this had to be rsynced outside of the website. By allowing the
upload here, and automatically purging the data from varnish, we will reach
"almost instant" updates of the ftp site structure on the web.
2011-12-06 19:13:32 +01:00
563790f170 Add views and templates to perform searches from the main web app
This makes it possible to render the search results on the main engine.
We still run the query on the seprate search server, so once has to be
configured in settings_local.py with the key SEARCH_DSN (standard
PostgreSQL/psycopg2 connection string)
2011-12-03 13:01:18 +01:00
84ba10f1ca Concept of mastersite is no longer used, remove all references 2011-11-27 12:35:02 +01:00
12cdc90e3e Implement is_behind_cache() and get_client_ip() functions to handle
the fact that when pages are served through Varnish, the request will come
from the Varnish server and not from the client.

Create a /system_information page that shows some information about the
connection to help diagnose how the caches work.
2010-06-17 14:11:50 +02:00
601a953f21 Add all the settings available to settings.py, even the ones that are
normally overwritten using settings_local.py.
2010-06-13 15:17:25 +02:00
047982b81d Refactor the list of objects needing moderation into utils/moderation.py,
and create a script to use this to generate a moderation report email.
2010-06-13 15:11:53 +02:00
81caa54e1b Clean up the admin interface - move our special links to the index page only,
remove them from the login form. Remove the Sites application, since we don't
use it.
2010-06-11 15:58:03 +02:00
93d3450213 Add app to store and view the PostgreSQL Weekly News, including generation
of the RSS feed. (Which will receive a new URL now that it lives in the
actual app and not in with the static files, so a redirect will be needed
there).
2010-06-10 20:43:54 +02:00
521920542b Get the information for the ftp browser from a file that is generated
on the ftp server, instead of crawling the directoreis directly. This
removes the requirement to sync almost 10Gb worth of ftp site onto the
web server...

The pickle file for this is currently around 1Mb, so it's not a huge
burden on the server. If it grows larger in the future, we may want to
re-think this and split it up, or put it in a database format or something
like that.
2010-06-10 14:46:16 +02:00
cad9eddd92 Implement the feature matrix 2010-01-11 22:55:00 +01:00
2982541900 Add bug submission form 2010-01-11 16:09:49 +01:00
4b9efc5bdc Add support for mirror selection and redirection. 2010-01-02 19:36:24 +01:00