|
|
Mads Kiilerich
|
7a4e2c6ec02f
|
4 years ago
|
|
setup: support Bleach 4.2 for Python 3.10 support
Changelog shows no significant API changes.
Bleach 3.2 and later are however even more unreasonably paranoid than 3.1, and the test thus has to be updated and we stop supporting 3.1 .
|
|
|
Mads Kiilerich
|
0383ed91d4ed
|
5 years ago
|
|
|
|
|
Mads Kiilerich
|
f375751fe3fa
|
5 years ago
|
|
|
|
|
Mads Kiilerich
|
5d8bfda01cf5
|
5 years ago
|
|
|
|
|
Mads Kiilerich
|
9685f50a69d0
|
5 years ago
|
|
|
|
|
Mads Kiilerich
|
3a12df6cbf30
|
5 years ago
|
|
lib: use sha1 instead of md5 in a couple of places
md5 is dead and should be avoided. In the places changed here, we want to keep using hashes without trivial collisions, but do not expect strong crypto security. sha1 seems like a trivial step up from md5 and without obvious alternatives. It is more expensive than md5, but we can live with that in these places.
The remaining few uses of md5() cannot be changed without breaking backwards compatibility or external API.
|
|
|
Mads Kiilerich
|
563708f2275d
|
6 years ago
|
|
|
|
|
Mads Kiilerich
|
141066b8a89a
|
6 years ago
|
|
|
|
|
Mads Kiilerich
|
08eec03c9485
|
6 years ago
|
|
|
|
|
Mads Kiilerich
|
756e46bd926b
|
6 years ago
|
|
py3: trivial renaming of .iteritems() to .items()
A bit like "2to3 -f dict", but we don't want list().
|
|
|
Mads Kiilerich
|
f79b864dc192
|
6 years ago
|
|
|
|
|
Mads Kiilerich
|
0a277465fddf
|
6 years ago
|
|
|
|
|
Mads Kiilerich
|
7e252987e5a7
|
6 years ago
|
|
lib: use Python dot notation for Markdown extensions
Gets rid of:
data/env/lib/python2.7/site-packages/markdown/__init__.py:259: DeprecationWarning: Using short names for Markdown's builtin extensions is deprecated. Use the full path to the extension with Python's dot notation (eg: "markdown.extensions.codehilite" instead of "codehilite"). The current behavior will raise an error in version 2.7. See the Release Notes for Python-Markdown version 2.6 for more info. DeprecationWarning)
|
|
|
Mads Kiilerich
|
42c4ffb45fe0
|
6 years ago
|
|
|
|
|
Mads Kiilerich
|
efba2fd4edf0
|
7 years ago
|
|
|
|
|
Mads Kiilerich
|
1b8dac14269f
|
7 years ago
|
|
|
|
|
Thomas De Schampheleire
|
9f41dc6f328a
|
7 years ago
|
|
|
|
|
Thomas De Schampheleire
|
2ac4499b25eb
|
7 years ago
|
|
lib: sanitize HTML for all types of README rendering, not only markdown The repository summary page will display a rendered version of the repository 'readme' based on its file extension. In commit 5746cc3b3fa5, the rendered output was already sanitized when the input was markdown. However, also readmes written in other formats, like ReStructuredText (RST) or plain text could have content that we want sanitized. Therefore, move the sanitizing one level up so it covers all renderers, for now and the future. This fixes an XSS issue when a repository readme contains javascript code, which would be executed when the repository summary page is visited by a user. Reported by Bob Hogg <wombat@rwhogg.site> (thanks!).
|
|
|
Thomas De Schampheleire
|
e74aa69f6827
|
7 years ago
|
|
lib: sanitize HTML for all types of README rendering, not only markdown The repository summary page will display a rendered version of the repository 'readme' based on its file extension. In commit 5746cc3b3fa5, the rendered output was already sanitized when the input was markdown. However, also readmes written in other formats, like ReStructuredText (RST) or plain text could have content that we want sanitized. Therefore, move the sanitizing one level up so it covers all renderers, for now and the future. This fixes an XSS issue when a repository readme contains javascript code, which would be executed when the repository summary page is visited by a user. Reported by Bob Hogg <wombat@rwhogg.site> (thanks!).
|
|
|
Mads Kiilerich
|
22c8f23cc75b
|
7 years ago
|
|
|
|
|
Mads Kiilerich
|
5746cc3b3fa5
|
7 years ago
|
|
lib: use bleach to sanitize HTML generated from markdown - fix XSS issue when repo front page shows README.md
Reported by Bob Hogg <wombat@rwhogg.site> .
|
|
|
Mads Kiilerich
|
2927d568f714
|
7 years ago
|
|
|
|
|
Mads Kiilerich
|
ea46ff2a9404
|
7 years ago
|
|
|
|
|
Mads Kiilerich
|
bfb6a25ecbd5
|
8 years ago
|
|
style: change markdown to use code-highlight class as usual for pygmentize
This make the styling simpler.
pygments.css can thus be generated with:
pygmentize -S default -f html | sed 's/^\(.*\) { /.code-highlight \1 { /g' > kallithea/public/css/pygments.css
|
|
|
Mads Kiilerich
|
ac7a406fd7f4
|
8 years ago
|
|
markdown: specify extensions directly - don't use old positional parameters
The only supported markdown version always used the compatibility mode. Move forward!
|
|
|
Mads Kiilerich
|
52b6083b94e6
|
8 years ago
|
|
lib: refactor detection of markup renderers
Make it easier to spot which functions actually are used.
|
|
|
Lars Kruse
|
7691290837d2
|
8 years ago
|
|
codingstyle: trivial whitespace fixes
Reported by flake8.
|
|
|
Mads Kiilerich
|
24632b87a263
|
9 years ago
|
|
helpers: inline @mention markup in urlify_text
MENTIONS_REGEX is already compiled.
|
|
|
Mads Kiilerich
|
ca830f9d01a8
|
9 years ago
|
|
helpers: inline url markup in urlify_text
We inline it so we eventually can match all patterns in the same regexp and thus avoid problems with parsing of formatted html. Inlining it will also make repo_name and other parameters easily available.
|
|
|
Mads Kiilerich
|
39dfc5fc0ec2
|
10 years ago
|
|
lib: allow ';' when recognizing URLs
URLs often contains '&' which often has been html encoded to '&' before urlification.
|
|
|
Andrew Shadura
|
588a160dbb9a
|
11 years ago
|
|
rst: in @mention parser, escape spaces so they don't go to HTML This eliminates extra spaces around @mentions. Every time mention was followed by a comma, for example: @username, have you seen it? it turned into: @username , have you seen it? So an extra space was inserted. It was inserted because otherwise rst parser might not recognise the markup (i.e. @user1, @user2 is replaced by **user1**,**user2** — that would be interpreted as <b>user1**,**user2</b>). See http://docutils.sf.net/docs/ref/rst/restructuredtext.html#character-level-inline-markup
|
|
|
Thomas De Schampheleire
|
dabdc356393b
|
11 years ago
|
|
|
|
|
Mads Kiilerich
|
94f25a680aad
|
11 years ago
|
|
|
|
|
Mads Kiilerich
|
10190008738e
|
11 years ago
|
|
|
|
|
Bradley M. Kuhn
|
1948ede028ef
|
11 years ago
|
|
|
|
|
Bradley M. Kuhn
|
ad38f9f93b3b
|
11 years ago
|
|
Correct licensing information in individual files.
The top-level license file is now LICENSE.md.
Also, in various places where there should have been joint copyright holders listed, a single copyright holder was listed. It does not appear easy to add a link to a large list of copyright holders in these places, so it simply refers to the fact that various authors hold copyright.
In future, if an easy method is discovered to link to a list from those places, we should do so.
Finally, text is added to LICENSE.md to point to where the full list of copyright holders is, and that Kallithea as a whole is GPLv3'd.
|
|
|
Bradley M. Kuhn
|
d1addaf7a91e
|
11 years ago
|
|
Second step in two-part process to rename directories. This is the actual directory rename.
|