Commit graph

20 commits

Author SHA1 Message Date
Slayer95
5eaed1b744
wmlunits: Specify error as class in html reports (#7581) 2023-05-05 21:05:09 +02:00
Elvish_Hunter
f6fbd6351a Added missing Python shebangs to several scripts 2017-10-02 21:30:00 +02:00
Ignacio R. Morelle
1fe8ed3a13 wmlunits: Include the build timestamp in the main panel (closes #5) 2017-08-14 03:03:17 -03:00
Ignacio R. Morelle
9db2ed630c wmlunits: More code clean-up 2017-08-12 02:24:07 -04:00
Ignacio R. Morelle
fcba9f498d wmlunits: Refactoring and quote clean-up 2017-08-11 03:41:44 -04:00
Ignacio R. Morelle
743d8c2278 wmlunits: More cleanup 2017-08-11 02:01:48 -04:00
Ignacio R. Morelle
a0029c06d1 wmlunits: Couple of cosmetic fixes 2017-08-09 03:10:07 -04:00
Ignacio R. Morelle
4d5a4fc4c6 wmlunits: Escape generated URLs and WML-defined output
Some refactoring and a lot of code changes are involved in this.
Basically, wmlunits has always fully trusted its WML input. This has
several implications:

 * URLs such as the ones for unit detail views tend to contain
   unescaped characters which are forbidden in URLs, such as spaces.
   While browsers generally tolerate this well, the result is still
   invalid HTML. The same applies to URLs used for inline CSS (e.g.
   background-image).

 * Most information read from WML such as unit names, descriptions,
   campaign names, era names, and so on, was blindly trusted and could
   allow an attacker to inject malicious HTML into units.wesnoth.org by
   uploading an add-on that would pass the units.wesnoth.org build
   process.

The resulting code might not be extent of regressions, but hopefully
we'll identify them quickly. This commit contains some additional noise
in the form of style fixes around offending lines as well. Backporting
to 1.12 is, as far as I understand, unnecessary since units.wesnoth.org
uses the master branch version of wmlunits, but it might be worth
evaluating whether to issue a warning for the 1 person in the world who
might be running the 1.12 version of the units.wesnoth.org toolchain on
their own facilities (okay, let's face it, nobody would ever do that).
2017-08-09 02:51:57 -04:00
Ignacio R. Morelle
6b5ba55fbc wmlunits: Restore build timestamp at the end 2017-08-07 01:27:13 -04:00
Ignacio R. Morelle
e9287e5b6b wmlunits: Rechristening Overview as the Build Report, table structure cleanup 2017-08-06 16:36:14 -04:00
Ignacio R. Morelle
d0c43b89c4 wmlunits: SEO-friendly page titles, and extra root element classes 2017-08-06 16:35:00 -04:00
Severin Glöckner
06d9909c86 Changed Shebang line of python scripts.
It's mostly about making the scripts run if python defaults to python3.
Has been tested for each script.
2016-11-25 09:57:25 +01:00
Elias Pschernig
3ab3db3166 [units.wesnoth.org] Converted the script to Python 3.
Basically ran all .py files through 2to3. I made a copy of wmlparser2.py
called wmlparser3.py for the Python3 version, so as to not inconvenience anyone
who may be using it in their old Python2 scripts.
2015-09-09 22:52:23 -04:00
Elias Pschernig
6632eaae33 [wmlunits] Fix error logging.
Now that a separate process is doing the WML parsing, need to serialize exceptions in the other process and send them to the main process to access them there.
2013-05-25 10:28:14 +02:00
Elias Pschernig
1a45e8f61e [wmlunits] Add warnings about missing images to log. 2012-03-08 12:51:51 +00:00
Elias Pschernig
811319b2a3 [wmlunits] exclude tempfile paths from error messages 2012-03-07 13:40:18 +00:00
Elias Pschernig
a295a6909f [wmlunits] converted error log to html 2012-03-07 13:20:26 +00:00
Elias Pschernig
80b2ae2cf2 [wmlunits] Added per-addon log pages. 2012-03-04 23:11:15 +00:00
Elias Pschernig
76a68a2c61 [wmlunits] fix path to error log 2012-03-04 17:38:31 +00:00
Elias Pschernig
8b145520a5 [wmlunits] Added error log page. 2012-03-04 15:46:41 +00:00