Commit Graph

187 Commits

Author SHA1 Message Date
ccb1282531 Update authentication to be django 2 compatible 2020-04-03 19:05:26 +02:00
fa32eff8ae Sync community auth plugin to be the latest-and-greatest
Combine changes from downstream projects (which were not that many
anymore)
2020-02-26 18:04:40 +01:00
e384b4c917 Fix a number of incorrect escapes
Pointed out by newer versions of pep8, but they were never correct.
2020-01-09 13:25:59 +01:00
69923c7190 Stop using bare exceptions
This is frowned upon in newer versions of pep8, so fix it once and for
all.
2020-01-09 13:14:32 +01:00
d2e91e2b8f Fix unicode bug from python3 conversion 2019-11-01 14:55:05 +01:00
12306255ad Switch to using pycryptodome instead of pycrypto
pycrypto is not being maintained, and pycryptodome is theoretically
a drop-in replacement (in practice, it seems it was close)
2019-11-01 14:52:35 +01:00
3be328a995 Save away copy of all ovailable oauth buttons
Including a reference to where we got them from.
2019-06-25 16:28:55 +02:00
18c7292eaa Update yum spider and download page for new reporpms
The yum project has switched to single-reporpm-for-multiple-versions as
well as putting them in a dedicated directory. This makes a lot of the
cruft in the code to deal with the distribution of reporpms unnecessary,
so change it.

We still need to keep track of which platforms exist for which versions,
so we do still need some spidering, but it's  alot simpler.

Since all versions are also always availeble, the javascript that
populates the version list can now just use the list of supported
versions. This could be rendered directly in the HTML, but we might need
to restrict versions-per-platform at some point in the future, and
javascript is needed anyway for the rest of the page, so we keep doing
it the old way.
2019-05-16 17:13:13 +02:00
7aab2eac7c Fix filemode for temporary files in yum spider
This was broken in the python3 update, but it's only used when testing
via temporary files and never in production, and thus went unnoticed.
2019-05-16 17:13:13 +02:00
b8038754aa Add Bootstrap grid classes to images referenced in the HTML docs. 2019-04-25 17:21:44 -04:00
3d3339249a Add a lot more code documentation to the documentation loader. 2019-03-31 17:02:43 -04:00
1f4c74c2c2 Do not use libtidy on content from SVG files. 2019-03-31 16:38:12 -04:00
a05801ba81 Remove global variable reference that increments the page count in the docloader.
This is primarily to remove some old code to allow for future changes
to how certain types of doc files can be loaded in the future.
2019-03-31 16:20:51 -04:00
3c3a117b66 Added pycodestyle to requirements.txt and pre-commit hook. 2019-03-10 11:40:05 -07:00
b332933b72 Explicitly use python3 in githook validation 2019-03-10 08:17:41 -07:00
c028ce47ea Load docs using COPY instead of INSERT
Issuing individual INSERTs for each line in the docs works decently when
local, but it slow when loading across The Tubes Of The Internet.
Switching to using COPY takes the load time from the buildfarm animal
from just over 2 minutes to about 6-7 seconds.
2019-02-22 16:39:41 +01:00
cbdb937597 Update docsload to use tidylib instead of tidy
The old library is not supported on py3. This is the same migration
we've done for other projects like pgarchives.
2019-01-26 17:21:37 +01:00
b74fa2146a Fix datatype and encoding for yum spider 2019-01-26 16:45:59 +01:00
28ad4e9c91 Re-instate previously hardcoded hostname in spiders 2019-01-26 16:40:55 +01:00
2c84a8ec63 Update search crawler for python3
This includes the switch to requests, but also a bunch of other changes.

While at it, fix it so we can do proper https validation.
2019-01-26 16:19:26 +01:00
499a40baf7 Update for new module/namespace for urllib 2019-01-26 16:19:26 +01:00
95df1aa888 Switch recaptcha, search, spiders and varnish to requests
Easiser to switch to the requests package than to figure out how to deal
with some of the encoding changes manually. And as a bonus, it's much
nicer to work with the requests package for the future.
2019-01-26 16:19:26 +01:00
a10eb6420b More generic changes from 2to3 2019-01-26 16:19:26 +01:00
9875fd8537 Attempt to fix localhtmlvalidate
It was already broken and didn't work properly, but update to py3 and at
least make it run. More changes are necessary to actually make it happy
again.
2019-01-26 16:19:26 +01:00
e0fcc082ee Remove indexer for old archives
We have been using the new archives for many years now, so remove this
instead of trying to port it to python3.
2019-01-26 16:19:26 +01:00
07d83eae42 Update script shebangs to use python3 2019-01-26 16:19:26 +01:00
b7f0398c15 Fix unicode for hashlib operations 2019-01-26 16:19:26 +01:00
c6c0bf1948 Update print and input syntax for python 3 2019-01-26 16:19:26 +01:00
edad84b1d0 Fix base64 encodings 2019-01-26 16:19:26 +01:00
9b42500478 Import latest auth.py from pgeu as sample 2019-01-26 16:19:26 +01:00
a156829375 Generic unicode updates 2019-01-26 16:19:26 +01:00
7547b6f766 Update syntax for relative imports 2019-01-26 16:19:26 +01:00
142f0805c2 Update to new style exception catching 2019-01-26 16:19:26 +01:00
f91181fb13 Add a githook and a config file to run pep8 pre-commit 2019-01-17 21:26:41 +01:00
00ab822ea8 Fix deprecated comparison structs 2019-01-17 21:19:57 +01:00
e3ec36b50c Remove multi-statement lines, per pep8 2019-01-17 20:52:17 +01:00
0883ac6423 Fix whitespace and indentation, per pep8 2019-01-17 20:47:43 +01:00
87237f6536 Tabs, meet your new overlords: spaces
In a quest to reach pep8, use spaces to indent rather than tabs.
2019-01-17 15:35:39 +01:00
e62309a391 Fix typos in comments
Review by Stephen Frost and Jonathan S. Katz
Discussion: https://postgr.es/m/6EEB2B47-D274-4E65-83B1-2EF8C917C55F%40yesql.se
2018-12-04 21:51:08 +01:00
e934d32251 Update purge hook for non-template updates
For /media/ changes, generate a classic purge based on the URL. For
anything tha'ts not templates *or* media, just don't generate any purges
at all (of course).
2018-07-16 11:31:21 +02:00
2d18abd401 Add a purgehook script that will auto-purge pages on git push
This will integrate with the gitdeployer script to automatically purge
pages using specific templates using the xkeys that were added some time
ago.
2018-07-16 11:10:42 +02:00
76900b7657 Teach varnish purging code about xkey purges
It's just another  type of purge, so it's added as an extra option with
'K' as the key (as 'X' was already taken).
2018-07-06 15:32:14 +02:00
6e89d2fb66 Turn off tidy indent on docs older than 11
It seems the newer tidy in Debian Stretch breaks with the output from
the old docs toolchain, causing indention to happen inside <pre> blocks
which clearly breaks rendering.

Turn it off for thos, but keep it enabled for version 11 and up (at this
point that's just dev), because the output becomes a lot easier to read
when trying to debug things.
2018-04-03 15:04:47 +02:00
bc701e9ff4 Update scrubbing script for new reality 2018-04-02 12:31:41 +02:00
0fccb6a154 Fix "RedHat" type and add instructions for the SUSE rpm repository.
Patches by Devrim Gündüz on pgsql-www.
2018-02-15 18:52:02 +01:00
4339b112d0 Fix yum spider for versions with >1 repo rpm
The code was supposed to pick the latest version of the repo rpm in this
scenario, but at some point the data structure was updated and the code
was not, so it ended up actually picking the *oldest* version of the
repo rpm.
2018-02-15 16:34:50 +01:00
7ed70f1067 Add a createuser callback for cauth django plugin
This callback can prevent new users from being created based on specific
criteria. The plugin is defined in settings.py, so it can be any python
code. For example, it can look up in a specific table if this user is
supposed to be allowed to log in at all.
2018-01-13 18:14:13 +01:00
79659ae1dc Add ability to import user to django cauth example
This has been in used around a number of community sites already,
backpatch it into the upstream master.
2018-01-13 18:11:21 +01:00
38ff645d5d Add possibility to turn off django cauth using settings in sample
This sample is used across most of our other sites, so add functionality
to install without having a local master repo.

Back-patch of pgeu commit 3e4d8c9101c2d309b134c2f5638aa40db8ef2cf5
2018-01-13 18:09:27 +01:00
4ce8184e65 Explicitly exclude urls with .. in search crawling
There were per-site configured rules defined but the regexp was slightly
incorrectly defined. However, we should just simply never crawl urls
like this unless they are normalized, so for now just add them to the
hardcoded exclusion rules.
2017-11-08 12:04:36 -05:00