Jonathan S. Katz [Mon, 16 May 2016 15:21:47 +0000 (11:21 -0400)]
 
Token generation for new account now matches new password reset code.
Jonathan S. Katz [Mon, 16 May 2016 14:44:51 +0000 (10:44 -0400)]
 
Pass in "last_login" explicitly when creating User account.
Magnus Hagander [Sun, 15 May 2016 18:56:45 +0000 (20:56 +0200)]
 
Add missing import
Magnus Hagander [Sat, 14 May 2016 20:17:07 +0000 (22:17 +0200)]
 
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.
Magnus Hagander [Sat, 14 May 2016 19:50:15 +0000 (21:50 +0200)]
 
More fixes for today -> today()
Magnus Hagander [Sat, 14 May 2016 19:42:38 +0000 (21:42 +0200)]
 
Remove old mirror selection code and data
This has not been used for many years now, so let's get rid of
it to save some maintenance.
Magnus Hagander [Sat, 14 May 2016 19:27:07 +0000 (21:27 +0200)]
 
today() is a function
Callables in querysets are deprecated, so make sure we don't end
up using them unintentionally...
Jonathan S. Katz [Sat, 14 May 2016 19:07:09 +0000 (15:07 -0400)]
 
Fixed "reset password" pattern matcher to match the Django 1.8 method for generating and reading reset password tokens.
Jonathan S. Katz [Sat, 14 May 2016 18:53:52 +0000 (14:53 -0400)]
 
Updated "requirements.txt" with Django 1.8.13 and django_markwhat 1.4 referenced
Magnus Hagander [Sat, 14 May 2016 18:47:47 +0000 (20:47 +0200)]
 
Stop using request.REQUEST
This is now deprecated and we should use request.GET instead.
Magnus Hagander [Sat, 14 May 2016 18:41:58 +0000 (20:41 +0200)]
 
Avoid returning NULL in nagios monitor
Jonathan S. Katz [Sat, 14 May 2016 18:27:25 +0000 (14:27 -0400)]
 
Substitute "request.raw_post_data" with the new attribute "request.body"
Magnus Hagander [Sat, 14 May 2016 18:17:14 +0000 (20:17 +0200)]
 
Simplify update script now that we're on uwsgi
Magnus Hagander [Thu, 28 Apr 2016 14:57:14 +0000 (16:57 +0200)]
 
Remove old migrate commands, not been used for years
Magnus Hagander [Thu, 28 Apr 2016 14:56:34 +0000 (16:56 +0200)]
 
Move django-inteacting tools to be management commands
Much easier to execute them in the correct environment now that we have
proper management commands in django.
Magnus Hagander [Thu, 28 Apr 2016 12:06:28 +0000 (14:06 +0200)]
 
Add migrations for all existing models
When migrating on existing installations, run the
python manage.py migrate --fake-initial
command.
Magnus Hagander [Thu, 28 Apr 2016 12:03:08 +0000 (14:03 +0200)]
 
Fix default value for language
Needs to be a static value for it to work properly once we enable
migrations.
Magnus Hagander [Thu, 28 Apr 2016 11:22:53 +0000 (13:22 +0200)]
 
Fix model warnings and deprecations
1. ForeignKey with unique -> OneToOneField
2. IPAddressField -> GenericIPAddressField
3. Fix fields with default=datetime.now() which gives server start time,
   not the insert time (clearly this default was never used, and the
   field was always explicitly set, but it should still not be incorrectly
   defined)
Magnus Hagander [Thu, 28 Apr 2016 09:36:00 +0000 (11:36 +0200)]
 
Fix incorrect use of {% url
Since we don't use it anywhere else, we'll just replace it with a
hardcoded string for now.
Magnus Hagander [Thu, 28 Apr 2016 09:35:38 +0000 (11:35 +0200)]
 
module_name has been renamed to model_name
Magnus Hagander [Thu, 28 Apr 2016 09:34:45 +0000 (11:34 +0200)]
 
Django no longer ships with buildin markdown
Instead, use django_markwhat, the same as we've done for other
postgreslq.org django projects.
Magnus Hagander [Thu, 28 Apr 2016 09:34:15 +0000 (11:34 +0200)]
 
Fix long-standing incorrect select_related parameter
This was broken before, but older django versions didn't notice it was
wrong and just ignored it. 1.8 throws an error, so now is a good time to
fix it.
Magnus Hagander [Thu, 28 Apr 2016 09:33:57 +0000 (11:33 +0200)]
 
mimetype is now called content_type
Magnus Hagander [Thu, 28 Apr 2016 09:33:08 +0000 (11:33 +0200)]
 
Forms must now always specify include or exclude fields
So for those forms that should have everything in them (and we don't
have a lot of those), set exclude=() to remove the error.
Magnus Hagander [Thu, 28 Apr 2016 09:32:13 +0000 (11:32 +0200)]
 
Prefix cross-application imports with pgweb
As required by the new project layout.
Magnus Hagander [Thu, 28 Apr 2016 09:31:25 +0000 (11:31 +0200)]
 
Update for new transaction handling in newer django versions
Magnus Hagander [Thu, 28 Apr 2016 09:25:02 +0000 (11:25 +0200)]
 
Fix URL namespace changes
1. Prefix all our local modules with "pgweb" as required by the new
   project layout.
2. Change the django core imports to match 1.8
3. redirect_to has been changed to RedirectView
In passing also tabify the urls file which used a horrible mix of tabs
and spaces. The python standard is spaces, but since the rest of the
pgweb projects uses tabs, make the urls.py files do that as well.
Magnus Hagander [Wed, 27 Apr 2016 17:42:49 +0000 (19:42 +0200)]
 
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.
Magnus Hagander [Wed, 27 Apr 2016 11:17:32 +0000 (13:17 +0200)]
 
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.
Dave Page [Thu, 12 May 2016 14:39:32 +0000 (15:39 +0100)]
 
Fix link
Dave Page [Thu, 12 May 2016 14:30:30 +0000 (15:30 +0100)]
 
Fix versions per Erik Rijkers
Dave Page [Thu, 12 May 2016 13:08:55 +0000 (14:08 +0100)]
 
PostgreSQL 9.6 Beta 1, 9.5.2, 9.4.7, 9.3.12, 9.2.16 and 9.1.21
Magnus Hagander [Wed, 27 Apr 2016 12:33:15 +0000 (14:33 +0200)]
 
Hide 8.0 by default from feature matrix
We're getting too many versions there, so from now on when we add
a new one, we have to remove an old one.
Magnus Hagander [Tue, 26 Apr 2016 13:22:03 +0000 (15:22 +0200)]
 
Make featurematrix use regular integer fields instead of custom field
The custom fields will give us pain when we upgrade to use django
migrations, and don't really add anything useful to us here.
Magnus Hagander [Wed, 13 Apr 2016 13:15:43 +0000 (15:15 +0200)]
 
Consistently use standard date formats for news entries
This appears to have become dependent on a django setting that we no
longer set -- and it's best to have a predictable format regardless.
Most things on the frontpage used the standard format, but not news,
leading to an annoyingly inconsistent view.
Magnus Hagander [Mon, 4 Apr 2016 16:28:32 +0000 (18:28 +0200)]
 
Fix headers on security archives page
Alvaro Herrera
Stefan Kaltenbrunner [Thu, 31 Mar 2016 18:25:35 +0000 (20:25 +0200)]
 
add xenial (ubuntu 16.04) per Christoph Berg on -www
Magnus Hagander [Thu, 31 Mar 2016 13:36:07 +0000 (15:36 +0200)]
 
Fix typo
Magnus Hagander [Thu, 31 Mar 2016 11:45:28 +0000 (13:45 +0200)]
 
New minor releases 9.5.2 and friends
Magnus Hagander [Tue, 29 Mar 2016 20:26:19 +0000 (22:26 +0200)]
 
Add texts about quarterly releases
Dave Page [Tue, 15 Mar 2016 09:58:25 +0000 (09:58 +0000)]
 
Fix typo
Magnus Hagander [Mon, 7 Mar 2016 21:02:24 +0000 (22:02 +0100)]
 
Use difflib to show differences when an object is edited
This makes for a much easier-to-read output, especially when the
modified field is more than one line.
Magnus Hagander [Mon, 7 Mar 2016 20:41:45 +0000 (21:41 +0100)]
 
Get rid of PgModel, replacing it with simple signals
We were already using signals for everything except delete, and even
in our old version of django the delete signal exists (it didn't exist
when this code was first written).
Django doesn't really like models to be OOP like this, so keeping PgModel
would cause issues with upcoming changes in django 1.8. Using simple functions
is easier, and the actual functionality is replicated straight off.
Dave Page [Mon, 7 Mar 2016 11:38:48 +0000 (11:38 +0000)]
 
Add PostgreSQL Up and Running (2nd Edition)
Magnus Hagander [Thu, 3 Mar 2016 14:53:10 +0000 (15:53 +0100)]
 
Properly set encoding for archives search post
Magnus Hagander [Wed, 2 Mar 2016 12:10:05 +0000 (13:10 +0100)]
 
Remove link that no longer exists
Reported by Chanoch Wiggers
Stefan Kaltenbrunner [Fri, 26 Feb 2016 18:49:40 +0000 (19:49 +0100)]
 
add wily werewolf and deprecate utopic - per complaint from andres on IRC
Thom Brown [Mon, 22 Feb 2016 09:27:13 +0000 (09:27 +0000)]
 
Update Google Summer of Code page for 2016.
Dave Page [Fri, 12 Feb 2016 09:09:51 +0000 (09:09 +0000)]
 
Correct bug severity level.
Dave Page [Fri, 12 Feb 2016 08:55:39 +0000 (08:55 +0000)]
 
Correct security info, per Noah.
Dave Page [Thu, 11 Feb 2016 13:51:33 +0000 (13:51 +0000)]
 
Add a couple of books.
Dave Page [Thu, 11 Feb 2016 13:38:39 +0000 (13:38 +0000)]
 
Release 9.5.1, 9.4.6, 9.3.11, 9.2.15, and 9.1.20
Dave Page [Thu, 11 Feb 2016 09:06:30 +0000 (09:06 +0000)]
 
Fix link to latest version per Daniel Cristian Cruz
Stefan Kaltenbrunner [Tue, 9 Feb 2016 20:08:39 +0000 (21:08 +0100)]
 
fix typo - per Daniel Gustafsson  on -www
Dave Page [Fri, 29 Jan 2016 17:47:57 +0000 (18:47 +0100)]
 
Add the core team email address to the core page.
Magnus Hagander [Fri, 29 Jan 2016 11:39:27 +0000 (12:39 +0100)]
 
Go back to using direct psycopg2 for docs loading
This removes the dependency on django from docload, facilitating
incremental upgrades of the infrastructure.
This now requires a new docload.ini file in the tools/docs directory,
with a section "db" and a setting "dsn".
Stefan Kaltenbrunner [Mon, 11 Jan 2016 19:06:05 +0000 (20:06 +0100)]
 
add russion presskit
Stefan Kaltenbrunner [Fri, 8 Jan 2016 15:35:46 +0000 (16:35 +0100)]
 
the next release is not 9.5 any more - now that we have pushed that one out the door
Dave Page [Thu, 7 Jan 2016 14:21:31 +0000 (14:21 +0000)]
 
Add the Italian press kit.
Dave Page [Thu, 7 Jan 2016 14:06:24 +0000 (14:06 +0000)]
 
Another URL fix
Dave Page [Thu, 7 Jan 2016 14:03:35 +0000 (14:03 +0000)]
 
Fix another link
Dave Page [Thu, 7 Jan 2016 13:59:49 +0000 (13:59 +0000)]
 
Fix URLs
Dave Page [Thu, 7 Jan 2016 13:52:58 +0000 (13:52 +0000)]
 
Fix alpha page wording following release
Dave Page [Thu, 7 Jan 2016 10:45:04 +0000 (10:45 +0000)]
 
Update for 9.5
Magnus Hagander [Sat, 26 Dec 2015 17:39:02 +0000 (18:39 +0100)]
 
Catch "unknown password hashing algoritm errors"
These errors typically happens when someone tries to log in before they
have completed the process by clicking the link in the received email,
so give them an error message showing this.
Dave Page [Fri, 18 Dec 2015 13:28:16 +0000 (13:28 +0000)]
 
Fix announcement URL & make the title look nicer
Dave Page [Fri, 18 Dec 2015 13:26:02 +0000 (13:26 +0000)]
 
9.5rc1
Dave Page [Fri, 18 Dec 2015 09:00:19 +0000 (09:00 +0000)]
 
Update CVE-2015-5289 per Noah.
Magnus Hagander [Thu, 17 Dec 2015 16:36:00 +0000 (17:36 +0100)]
 
Fix long standing bug in determining remote IP
The check was for is_behind_cache without the (), meaning it always
returned true, which in turn meant we trusted all x-forwarded-for
headers. It was pretty hard to get them into the system, and
we didn't actually use it for anything other than locking survey
submissions, so it's not a big problem.
However, the basic logic was also wrong, as it assumes that all
SSL connections terminate directly at the backend server, which is
not necessarily true anymore.
The new version of the function will trust an X-Forwarded-For as
long as it's set on one of our frontend servers, regardless of if
it's an encrypted connection or not.
Magnus Hagander [Thu, 17 Dec 2015 16:32:52 +0000 (17:32 +0100)]
 
Add a system_information view available through SSL
Magnus Hagander [Thu, 17 Dec 2015 16:22:20 +0000 (17:22 +0100)]
 
Remove dead code
Dave Page [Thu, 17 Dec 2015 15:39:05 +0000 (15:39 +0000)]
 
Fix typo
Magnus Hagander [Thu, 17 Dec 2015 15:38:41 +0000 (16:38 +0100)]
 
Fully log attempts to log in during cooloff period
Magnus Hagander [Thu, 17 Dec 2015 15:34:18 +0000 (16:34 +0100)]
 
Implement a "cooloff period" for community authentication
This lets us configure some sites that require accounts to have been
in the system for longer than a certain time before they are allowed
to log in to that site. In particular, the wiki is easy to spam, so
we want those users to be in the system for a while before they can
try something like that.
Requires manual sql to be run on all installations:
ALTER TABLE account_communityauthsite ADD COLUMN cooloff_hours int NOT NULL DEFAULT 0;
Magnus Hagander [Thu, 17 Dec 2015 15:07:18 +0000 (16:07 +0100)]
 
Generate recaptcha specific tracing
Magnus Hagander [Thu, 17 Dec 2015 14:53:33 +0000 (15:53 +0100)]
 
Stop including remote IP in recaptcha requests
It only shows our frontend terminators anyway at this point, so it will
be incorrect data. We'll add it back in once that's solved.
Magnus Hagander [Thu, 17 Dec 2015 14:27:31 +0000 (15:27 +0100)]
 
Fix typo in log message
Magnus Hagander [Thu, 17 Dec 2015 14:25:24 +0000 (15:25 +0100)]
 
Re-enable registration again
Now with better tracing, so we can figure out what's actually happening.
Magnus Hagander [Thu, 17 Dec 2015 14:25:10 +0000 (15:25 +0100)]
 
Add more random entropy to data used to generate tokens
Magnus Hagander [Thu, 17 Dec 2015 14:21:11 +0000 (15:21 +0100)]
 
Add a lot of tracing about account signups
Trying to track down how all these accounts are actually created.
Magnus Hagander [Thu, 17 Dec 2015 13:43:35 +0000 (14:43 +0100)]
 
Revert "Re-enable captchas now that we have captchas"
Yup, it seems they manage to register even with captchas on the page.
Magnus Hagander [Thu, 17 Dec 2015 13:03:11 +0000 (14:03 +0100)]
 
Don't crash when browser doesn't have javascript enabled
Instead, just indicate that the captcha is required.
Yes, it sucks to require javascript, but it's at least only for the
signup step...
Magnus Hagander [Thu, 17 Dec 2015 12:57:03 +0000 (13:57 +0100)]
 
Re-enable captchas now that we have captchas
Let's hope it's not actually recaptcha that is broken..
Magnus Hagander [Thu, 17 Dec 2015 12:53:29 +0000 (13:53 +0100)]
 
Properly pass remote IP address to recaptcha
In theory, at least, they can make a better decision for people to get past the
captcha with more knowledge. The parameter is currently option, but it's not
unlikely it might become mandatory in the future, so we might as well include it.
Magnus Hagander [Thu, 17 Dec 2015 12:37:49 +0000 (13:37 +0100)]
 
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.
Magnus Hagander [Wed, 16 Dec 2015 17:24:56 +0000 (18:24 +0100)]
 
Attempt a very crude way to stop new signups
Magnus Hagander [Sat, 12 Dec 2015 16:44:22 +0000 (17:44 +0100)]
 
Replace simpljson imports with json
This has been in standard python since 2.6, and we don't really care
about supporting anything older than that (even our old and soon to
be upgraded environments use 2.7)
Stefan Kaltenbrunner [Mon, 7 Dec 2015 21:33:34 +0000 (22:33 +0100)]
 
Update entry on the book from Guillaume, per his patch on pgsql-..
Stefan Kaltenbrunner [Mon, 7 Dec 2015 21:30:07 +0000 (22:30 +0100)]
 
remove ubuntu 10.04/lucid from the ubuntu download page - per report from
Jens Larsson on pgsql-www
Dave Page [Mon, 16 Nov 2015 09:25:32 +0000 (09:25 +0000)]
 
Add 2UDA to the 3rd party distros download section per -www discussion.
Dave Page [Thu, 12 Nov 2015 19:10:02 +0000 (19:10 +0000)]
 
9.5 beta 2
Dave Page [Thu, 5 Nov 2015 09:00:40 +0000 (09:00 +0000)]
 
Use more direct URL, per comments from Heikki
Stefan Kaltenbrunner [Wed, 4 Nov 2015 19:03:08 +0000 (20:03 +0100)]
 
add a "current" link to the docs page to encourage people to refer to
the "current" docs instead of linking to versioned urls.
Thanks to Amir Rohan for both the idea and the patch!
Magnus Hagander [Wed, 4 Nov 2015 17:17:23 +0000 (18:17 +0100)]
 
Fix handlig of upper/mixed case email addresses on signup
The validation that the two entered email addresses were the same
did not work properly in this case - only login and other related
pages.
Dave Page [Thu, 8 Oct 2015 14:39:42 +0000 (15:39 +0100)]
 
Cleanup text a little
Dave Page [Thu, 8 Oct 2015 14:31:35 +0000 (15:31 +0100)]
 
9.5b1 and backbranch releases.
Magnus Hagander [Wed, 7 Oct 2015 13:54:25 +0000 (15:54 +0200)]
 
users_keys is a view in production..
Magnus Hagander [Wed, 7 Oct 2015 13:53:36 +0000 (15:53 +0200)]
 
Drop objects in the correct order..
Magnus Hagander [Tue, 6 Oct 2015 13:00:24 +0000 (15:00 +0200)]
 
Also get rid of old users_keys table
Magnus Hagander [Tue, 6 Oct 2015 12:55:19 +0000 (14:55 +0200)]
 
Scrub organizations a bit more, per Stephen