mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
Fix base64 validation and add unittests (#10515)
Implement proper padding character checks
This commit is contained in:
parent
1bc753f655
commit
89f3991351
4 changed files with 124 additions and 6 deletions
|
@ -910,7 +910,9 @@ Call these functions only at load time!
|
|||
* Example: `minetest.rgba(10, 20, 30, 40)`, returns `"#0A141E28"`
|
||||
* `minetest.encode_base64(string)`: returns string encoded in base64
|
||||
* Encodes a string in base64.
|
||||
* `minetest.decode_base64(string)`: returns string
|
||||
* `minetest.decode_base64(string)`: returns string or nil on failure
|
||||
* Padding characters are only supported starting at version 5.4.0, where
|
||||
5.5.0 and newer perform proper checks.
|
||||
* Decodes a string encoded in base64.
|
||||
* `minetest.gettext(string)` : returns string
|
||||
* look up the translation of a string in the gettext message catalog
|
||||
|
|
|
@ -5773,7 +5773,9 @@ Misc.
|
|||
* Example: `minetest.rgba(10, 20, 30, 40)`, returns `"#0A141E28"`
|
||||
* `minetest.encode_base64(string)`: returns string encoded in base64
|
||||
* Encodes a string in base64.
|
||||
* `minetest.decode_base64(string)`: returns string or nil for invalid base64
|
||||
* `minetest.decode_base64(string)`: returns string or nil on failure
|
||||
* Padding characters are only supported starting at version 5.4.0, where
|
||||
5.5.0 and newer perform proper checks.
|
||||
* Decodes a string encoded in base64.
|
||||
* `minetest.is_protected(pos, name)`: returns boolean
|
||||
* Returning `true` restricts the player `name` from modifying (i.e. digging,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue