* Fix addon manager crash if not finding the add-on
In the addon manager, there was no validation code for paths in the file
system for uploading addons. This fix adds validation at the parsing
level, so that the original code is left unchanged.
* Fixes for addon manager crash commit
Fixes include:
1. Spaces kept instead of tabs.
2. printf-style String Formatting is used since it seems to be compatible
with nearly all versions of Python.
3. A trailing line break was added to the formatted string.
[wesnoth_addon_manager] Allow overriding keys in _server.pbl
Example usage:
wesnoth_addon_manager \
--port 1.13.x \
--upload ~/.local/share/wesnoth/1.13/data/add-ons/example \
--pbl-override version "$(git describe --tags)" \
--pbl-override description "$(cat avoid_copy_paste_with_WML)" \
--pbl-override passphrase "in countrary to server.pbl, this is secret"
Downsides: user has to be aware that specifying
passwords as CLI arguments is not safe in a multi-user environment.
If we're really-really serious about it, we should parse
values from environment variables then..
I wouldn't bother though.
fixes GH-2485
To remove an add-on, you now have to use:
--remove ADD_ON PASSPHRASE
instead of:
--password 123 --remove NAME
Also, this commit fixes the badly
documented --password field.
It could previously be read as it can be applied
to any operation, not only removal.
But in fact it could only be used for removal.
Fixes GH-2445
This includes campaignserver_client.py which is also used by wescamp.py
- however wescamp.py is still Python 2 at this point and will need to be
upgraded at a later point in time.
Fixes its help entry looking like this:
> --change-passphrase ADD-ON OLD NEW ADD-ON OLD NEW ADD-ON OLD NEW
> Change the passphrase for ADD-ON from OLD to NEW
When it really should look like this:
> --change-passphrase ADD-ON OLD NEW
> Change the passphrase for ADD-ON from OLD to NEW
To achieve this, add the same leading comment section ("do no edit this
file", etc.) and use the same indentation format as the C++ engine, and
don't use quotes around the uploads attribute value (it's an integer).
...this only was needed before the routing of python scripts through
safe.py. Also removed the validation mechanism for python scripts - it
never was used as far as I know."