Commit graph

202 commits

Author SHA1 Message Date
sigurdfdragon
c2cf0288fc Update changelog 2018-07-29 12:43:56 -04:00
Iris Morelle
c56e8aa695 Sync 1.14 changelog
[ci skip]
2018-07-27 19:08:38 -04:00
gfgtdf
2554c166dd disallow loading lua bytecode via load/dofile (CVE-2018-1999023)
This could otherwise be used to escape the lua sandbox, as described in
multiple sources. For example one can use it to reenable the os.execute
function to do shell commands

The affected functions were
load,loadstring,wesnoth.dofile,wesnoth.require and various places in the
wesnoth source where lua chunks were loaded for example by the ai code.

This commit also changes the lua source to change luas load (which is
the same as loadstring), alternatively we could add a wrapper around the
original load function that always passes "t" as third parameter, i went
this way mostly because it was easier to implement, but also because i
was not 100% sure that is is impossible to query the upvalues of a
function via lua (wesnoth disables debug.getupvalue but still).

There is also an occurance in the application_lua_kernel that was not fixed
because i assumed that umc cannot contian application lua scipts.

As further security measure we might want to disable printing the function
adress in luas tostring for c functions, this cannot be exploited by itself
but it can be used to defeat ASLR in some cases.
2018-07-27 15:36:56 +03:00
Toom
c0727bacf3 Fix 4801629ab1 typos
[ci skip]
2018-07-23 17:34:22 +03:00
gfgtdf
b684c8b3aa fixup update changelog.md 2018-07-23 17:33:41 +03:00
gfgtdf
4801629ab1 Update changelog.md 2018-07-23 17:33:30 +03:00
Jyrki Vesterinen
aea5d67f93 Changelog: fix issue #3277 being mistyped as 3722 2018-07-23 15:13:56 +03:00
Elvish_Hunter
af63d17e32 wmlindent: fixed crash on non-existent paths
Fixes #3346
2018-07-21 21:12:20 +02:00
sigurdfdragon
f6f1093661 SotA S21: Fix #3293: Nagas stealing villages
By having the nagas be able to recruit and put the gold to use.
Fits dialog better, improves play, & makes naga leader less suicidal.
2018-07-20 21:12:03 -04:00
Nils Kneuper
111b5db7b4 updated Bulgarian translation 2018-07-17 22:57:35 +02:00
Martin Hrubý (hrubymar10)
bc4d22dc72 Migrate links to https if available - Fwd c18537edc0 2018-07-16 19:07:08 +11:00
Nils Kneuper
3a3bf21e37 updated Hungarian translation 2018-07-14 01:15:20 +02:00
Charles Dang
d5972c6f43 Synced 1.14.3+dev changelog section with the 1.14 branch
[ci skip]
2018-07-13 21:03:51 +11:00
Charles Dang
264389807c Upgrade to Lua 5.3.5 2018-07-13 21:02:12 +11:00
Jyrki Vesterinen
1699c0d3f9 Fix #2789: lobby chat scrolls to top on new messages if not at bottom 2018-07-10 19:54:34 +03:00
sigurdfdragon
4fbeff273a Update changelog 2018-07-10 12:44:53 -04:00
Charles Dang
d8426ac37a Updated changelog
[ci skip]

The chatbox entry was redundant.
2018-07-09 14:58:10 +11:00
sigurdfdragon
7d60eeeefb Update changelog 2018-07-04 17:43:42 -04:00
Charles Dang
226a7f7d02 Removed preference to disable halos
There's really no reason to have this anymore. It was (AFAIK) introduced years ago
as a performance-saving measure, then was moved to Advanced Preferences in 1.13 since
modern PCs mostly have no issues. With accelerated rendering, there's even less of a
reason to have this.
2018-06-29 15:07:48 +11:00
Iris Morelle
fbc9ac5a52 wmllint: Skip inexistent paths passed in the command line
Fixes issue #3286.

[ci skip]
2018-06-28 00:27:28 -04:00
Iris Morelle
c92e167a14 wmllint: Leave gzipped binary files alone, they're not safe for consumption
Fixes wmllint crashing like this upon encountering a gzip tarball in an
add-on:

  Traceback (most recent call last):
    File "/home/shadowm/bin/wmllint-1.14", line 3188, in <module>
      for fn in allcfgfiles(directory):
    File "/home/shadowm/bin/wmllint-1.14", line 2944, in allcfgfiles
      if interesting(os.path.join(root, name)):
    File "/home/shadowm/bin/wmllint-1.14", line 2927, in interesting
      return fn.endswith(".cfg") or is_map(fn) or issave(fn)
    File "/home/shadowm/src/wesnoth-1.14/data/tools/wesnoth/wmltools3.py", line 270, in issave
      return firstline.startswith("label=")
  TypeError: startswith first arg must be bytes or a tuple of bytes, not str

[ci skip]
2018-06-27 03:42:58 -04:00
Jyrki Vesterinen
4bda3e7311 Fixed saving a map as a scenario not enabling scenario editor tools 2018-06-26 20:31:30 +03:00
Charles Dang
dd69107c9b Removed scaling algorithm customization
We're going to be using NN scaling for the map, and that's already handled automatically
by SDL (and in the future, OGL). We don't need these settings for surface SCALED_TO_ZOOM
and SCALED_TO_HEX scaling. In any case, if we want to scale a surface to zoom or hex, it
will almost certainly be for map rendering (such scaling methods don't make sense in the
UI, for example), so just defaulting to NN is simplest.

As for why I've decided to stick with nearest-neighbor scaling for zoom, it happens to look
a lot better when done on the GPU than on the CPU for some reason (perhaps having to do with
the old rendering pipeline in which we were doing surface scaling), and it's better to have
a consistent scaling look as you zoom in, especially if we wanted to do animated zoom-ins.

This change drops the option to use Linear or xBRZ scaling for map zooming. This was already
the practical case due to me converting map rendering to use textures. NN was used for all
zoom levels, and it's fast and looks good.
2018-06-25 16:37:27 +11:00
Iris Morelle
1db6fb393e campaignd: Detect .po files in add-ons and add them to the list of locales 2018-06-24 04:52:56 -04:00
Iris Morelle
e46c05162f sound: Halt sound sources that go inaudible instead of fading them out
Fixes #3280.
2018-06-24 00:36:36 -04:00
Charles Dang
48c13761cc Updated changelog
[ci skip]
2018-06-23 06:03:50 +11:00
Charles Dang
f59f68a527 GUI2/Unit Preview Pane: fixed default race icon not showing for units
Missed in 207e763401. Was only working for unit types.
2018-06-23 05:50:12 +11:00
Iris Morelle
0c2298d8c2 config/cache: Ensure built-in symbols like WESNOTH_VERSION are always defined
Half-fix for issue #1634 and issue #1924.

The issue that remains to be solved is that on subsequent sessions after
a campaign has failed to load, it is possible for the game to generate a
cache entry for it that only contains the main menu WML for it.
Apparently the config cache transactions mechanism causes the game to
try to generate a cache entry with the wrong defines (a define set that
doesn't include the campaign's symbol, for instance) instead of the ones
that are actually needed and used to match the cache entry's filename
via checksumming. As a result, on subsequent sessions the failed
campaign is aborted with "failed to load the scenario" instead of
displaying the real WML error again (since the error is not hit again if
it depends on the campaign's symbol being defined).

In the meantime, this at least removes the red herring error and makes
the underlying issue a bit more visible. It's a very crude hack but it
does the job.
2018-06-18 18:34:02 -04:00
Iris Morelle
6b2ca32026 U does not precede G in the English alphabet
[ci skip]
2018-06-18 04:49:54 -04:00
Iris Morelle
cdc8da25ae wesnothd: Fix lobby messages and whispers not being truncated as they should
For lobby messages, there was a length cap in place already, but the
truncated message was lost in processing because it ended up in a WML
document that isn't the one relayed to listening clients.

On the other hand, whisper messages were missing the truncate logic
entirely. Oops.

(The logic for in-game messages does truncate messages correctly as far
as I can tell, and additionally the client UI doesn't allow overlong
messages.)

Thanks to Soliton for pointing me towards the faulty code.
2018-06-18 04:48:29 -04:00
Charles Dang
c2c613325b Faction Select: fixed changes persisting even if you cancel the dialog 2018-06-16 14:03:01 +11:00
Charles Dang
a5169f7c50 GUI2/Menu Button: allow changing selections with the scrollwheel (closes #3251)'
The changelog entry is under 1.14.3+dev since this is going to be backported.
2018-06-16 13:43:42 +11:00
Charles Dang
e8d55062c4 Fixed MP admins being unable to observe private games (fixes #2851)
This was due to the change in the MP initialization process wherein the lobby wouldn't
show up until the initial gamelist was received. Since the admin auth message is sent
after [join_game] and before the initial gamelist, and the chatbox widget handled parsing
the auth message, the client was never marked as authenticated and therefor couldn't
observe private games. This fixes that by adding auth parsing to the MP initialization
process.

Note this doesn't fix the issue of the auth confirmation not showing up in the lobby chat
(issue #2920). I'll have to think of a way to fix that separately.
2018-06-11 13:05:11 +11:00
Charles Dang
802443eaf9 Updated changelog
[ci skip]
2018-06-10 14:37:21 +11:00
Charles Dang
8baeb8457d Added an advanced preference for the PRNG combat option
[ci skip]
2018-06-10 14:24:02 +11:00
Celtic Minstrel
93d4a12375
Remove duplicate changelog entries 2018-06-09 22:32:57 -04:00
Charles Dang
b27d1c21f5 Changelog: moved an entry, fixed a typo
[ci skip]
2018-06-10 13:28:34 +11:00
Charles Dang
92c67f5244 Removed a duplicate changelog entry I missed
[ci skip]
2018-06-10 13:25:29 +11:00
Charles Dang
70a1cdd3e6 Removed duplicate changelog entries under the 1.15.0-dev header
[ci skip]

These were all mentioned between 1.13.13 and 1.14.3, meaning the remaining changes
are everything new in 1.15.0-dev so far. Also removed one entry that was mentioned
twice in the WML Engine section.
2018-06-10 13:21:44 +11:00
Charles Dang
b5f1e1a48a Statistics Dialog: remove mode toggle in favor of an All Scenarios menu entry
Closes #2886.
2018-06-10 12:57:35 +11:00
Charles Dang
556d088e57 Added 1.13.13 - 1.14.3 changelog sections
[ci skip]

Duplicate entry cleanup for the 1.15.0-dev section to come
2018-06-10 11:15:25 +11:00
Charles Dang
b6416b8329 DiD S1/S6: new Parthyn maps
[ci skip]
2018-06-10 10:45:29 +11:00
Iris Morelle
ce8bf3cfc3 Move changelog entry around
[ci skip]
2018-06-09 19:43:45 -04:00
Charles Dang
42349651cb Fixed [scenario] map_file basically being unusable
Automatically checking the path relative to a maps/ directory without binary
path support results in an invalid path almost every single time. If I remember
correctly from my testing, the only time that worked was if I added a data/maps
folder.
2018-06-10 10:32:39 +11:00
Iris Morelle
5871557dbf Fix Lua errors when failing to set a music track on an empty playlist
Closes #3194.
2018-06-09 18:55:03 -04:00
Charles Dang
00e58f12f9 Unit Attack: fixed issues arising from displayed items potentially not equally available items
Since there were weapons included that weren't shown, it was possible for the best
weapon selection to be a hidden one (in which case, the initial selection would be
wrong, and it was possible for the returned index to point to a hidden, disabled
weapon.

This resolves both issues by excluding these disabled attacks from the weapon choices
list altogether. They aren't considered when calculating the best attack either.

mouse_handler::fill_weapon_choices is also used in mouse_handler::attack_enemy_, but
I don't foresee this change should cause any issues there, since you aren't supposed
to be able to actually attack with disabled weapons anyway.
2018-06-09 03:34:22 +11:00
mattsc
7afe6adbee Update changelog with Lua AI efficiency improvements 2018-06-07 06:55:10 -07:00
mattsc
7ed5b210b5 Changelog: collect AI entries in 'AI' section 2018-06-07 06:52:27 -07:00
Iris Morelle
94a85e0185 Changelog entry for the fix for issue #3206
[ci skip]
2018-06-06 04:22:08 -04:00
Iris Morelle
085236f556 gui2/unit_create: Do not exclude do_not_list units
This is a debug mode-only dialog. If I want to spawn a unit, the game
had better allow me to spawn any unit I want. do_not_list was created
for use by wmlunits anyway.
2018-06-06 03:14:07 -04:00