Commit Graph

361 Commits

Author SHA1 Message Date
Rémi Verschelde 0eab0d9343 Update copyright statements to 2019
Happy new year to the wonderful Godot community!
2019-01-03 11:41:35 +01:00
Fabio Alessandrelli 5262d1bbcc Fix marshalls size checks.
Yesterday, when playing around with my network code, I realized there is
a security issue in decode_variant, at least when decoding PoolArrays.
Basically, the size of the PoolArray is encoded in a uint32_t, when
decoding it, that value is cast to int when comparing if the packet is
actually that size causing numbers with MSB=1 to be interpreted as
negative thus always passing the check. That same value though, is used
as uint32_t again to resize the output vector.  For this reason, sending
a malformed packet with declared type PoolByteArray and size of 2^31(+x)
causes the engine to try to allocate 2+GB of pool memory, causing the
engine to crash.
2018-07-28 21:21:19 +02:00
GagaPete 139185e543 Fix CORS problems due to added headers on JS target
Before this change, missing User-Agent and Accept headers were automatically
added on all platforms. Setting the User-Agent header forces the browser to
do a CORS preflight (see 1) which fails if the HTTP endpoint is not
configured appropriate. It's not neccesary to set either header as the
browser sets them and so this commit disables that functionality on the JS
target.

1: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#Simple_requests
(cherry picked from commit 8a4dccc4ce)
2018-07-08 15:39:15 +02:00
Paul Joannon 1d3be8c453 fix API string path
(cherry picked from commit a35c8bbdc7)
2018-05-13 23:03:48 +02:00
Hein-Pieter van Braam bcb38393a5
Merge pull request #18157 from RandomShaper/improve-uri-utils-3.0
Improve/fix URI utils (3.0)
2018-05-13 21:11:42 +02:00
Max Hilbrunner 0551c5c2cd PCKPacker:pck_start(): Update version
(cherry picked from commit a3aa5ad0d0)
2018-05-01 22:04:08 +02:00
Pedro J. Estébanez c07d588e80 Fix listing files inside directory in pack file
When adding a directory path to the inventory of the pack, an empty file name was being added to the file list. That made `Directory.get_ntext()` signal end-of-list too early so that files in a subdirectory were missed.

Fixes #15801.
Helps with #16798.

(cherry picked from commit 536611704a)
2018-04-28 17:35:48 +02:00
Pedro J. Estébanez 46101928bd Enhance HTTPClient.query_string_from_dict()
(cherry picked from commit 8d8e9d54c8)
2018-04-12 21:20:10 +02:00
Andrew Dunai 683511310e Fix garbage in string padding.
(cherry picked from commit 0269e366f1)
2018-03-28 23:51:31 +02:00
Pedro J. Estébanez 8da76f3bb8 Fix wrong SSL handshake
The name of the remote host is passed to mbed TLS in all cases so the client hello message is correctly formed.

(cherry picked from commit 602da6fa4f)
2018-03-28 23:49:00 +02:00
Artem Varaksa eacd66e784 Clean up some bad words from code comments
(cherry picked from commit d35e486228)
2018-02-22 12:22:41 +01:00
luz.paz 751806b5c7 Fix typos with codespell
Found via `codespell -q 3 --skip="./thirdparty,./editor/translations" -I ../godot-word-whitelist.txt`
Whitelist consists of:
```
ang
doubleclick
lod
nd
que
te
unselect
```

(cherry picked from commit 612ab4bbc6)
2018-02-22 12:17:06 +01:00
hungrymonkey 245c11be08 Change function signature from float to double to match type get_doubleCloses #16160
(cherry picked from commit d2f1c87063)
2018-02-21 23:59:15 +01:00
Marlon Henry Schweigert 5481ece976 Display set_nodelay to GDScript
Pass enabled arg

Rename set_nodelay to set_no_delay

Add description to the method

Change description

(cherry picked from commit 87adf9cfba)
2018-02-04 20:02:04 +01:00
Rémi Verschelde 9f479f096c Fix typos in code and docs with codespell
Using v1.11.0 from https://github.com/lucasdemarchi/codespell
2018-01-18 22:01:42 +01:00
Rémi Verschelde 6c46787749 doc: Replace some more "val" with "value" + sync 2018-01-17 10:43:23 +01:00
Paul Joannon e08b6c9a9c fix set_stream_peer binding in PacketPeer 2018-01-12 14:25:05 +01:00
Bojidar Marinov 9b8e8b2220
Bind many more properties to scripts
Notable potentially breaking changes:
- PROPERTY_USAGE_NOEDITOR is now PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_NETWORK, without PROPERTY_USAGE_INTERNAL
- Some properties were renamed, and sometimes even shadowed by new ones
- New getter methods (some virtual) were added
2018-01-12 00:58:14 +02:00
Ruslan Mustakov a6157245b1 Dont print error when loading resource from cache 2018-01-11 20:46:18 +07:00
Juan Linietsky 50b975548d Removed PBM bitmap loader, added abiliy to importi mages as bitmap. Fixes #14828 2018-01-06 16:38:36 -03:00
Rémi Verschelde e4213e66b2 Add missing copyright headers and fix formatting
Using `misc/scripts/fix_headers.py` on all Godot files.
Some missing header guards were added, and the header inclusion order
was fixed in the Bullet module.
2018-01-05 01:22:23 +01:00
Rémi Verschelde b50a9114b1 Update copyright statements to 2018
Happy new year to the wonderful Godot community!
2018-01-01 14:40:47 +01:00
Juan Linietsky b3a1bf3245 Use a different strategy for path remaps, try loading from a remap file instead.
This ensures multiple PCK exports still work.
2017-12-18 11:21:49 -03:00
Fabio Alessandrelli 92067b4714 Remove "const" from PacketPeer get_packet/get_var
They are NOT constant methods, as state by the comment message,
they fetch the last packet and then forget about it, actively
changing the state of the object.
2017-12-15 17:14:17 +01:00
Fabio Alessandrelli 206275f3e7 Fix javascript build error and improve #14604 2017-12-15 15:35:18 +01:00
Juan Linietsky 433cb6f490 fix compile issue 2017-12-15 09:04:57 -03:00
Juan Linietsky 251433847f -Added new scene conversion to binary on export (disabled by default, please test)
-This method works by directly converting text to binary, so the scene does not need to be loaded and saved
2017-12-15 08:39:26 -03:00
Rémi Verschelde 108a36f515
Merge pull request #14604 from mhilbrunner/http-defaults
HTTP cleanup & better defaults
2017-12-15 07:53:38 +01:00
Juan Linietsky 93a63a5e1a GDScript files are converted to binary on export now. 2017-12-14 15:34:47 -03:00
mhilbrunner 966c054fc9 HTTP cleanup & better defaults 2017-12-14 10:59:42 +01:00
mhilbrunner a7abb459c9 HTTPClient: Add PATCH method and missing HTTP status codes 2017-12-12 10:56:18 +01:00
Rémi Verschelde a845411454 Style: Re-apply clang-format over recent invalid additions 2017-12-10 01:27:02 +01:00
Rémi Verschelde 13c2ff9320 Style: Apply new clang-format 5.0 style to all files 2017-12-07 08:02:00 +01:00
Rémi Verschelde d5ca9e2f6f Style: Apply clang-format again on all files
Fixes issues introduced by newer clang-format versions or commits
pushed directly without using the clang-format pre-commit hook.
2017-12-07 08:02:00 +01:00
Rémi Verschelde e6f3253f7d
Merge pull request #12603 from GodotExplorer/beautify-json
Add indent and sort keys support for JSON.print
2017-12-06 23:53:05 +01:00
Rémi Verschelde c7e53f1934 Fix javascript build after bc2e8d99 2017-11-27 08:17:28 +01:00
Juan Linietsky bc2e8d99e5 Made Vector::ptrw explicit for writing, compiler was sometimes using the wrong function,
leading to unnecesary copy on writes and reduced performance.
2017-11-25 00:09:40 -03:00
Juan Linietsky 0300522189
Merge pull request #13176 from bojidar-bg/allow-subproperty-set
Fix combatibility with older .scn files
2017-11-22 08:46:34 -03:00
Bojidar Marinov 3eb7858a3a
Fix combatibility with older .scn files 2017-11-22 13:34:43 +02:00
Rémi Verschelde 613d374bc5
Merge pull request #12284 from bojidar-bg/allow-subproperty-set
Allow for getting/setting "dotted" properties of objects
2017-11-21 22:44:14 +01:00
Bojidar Marinov 0cf9597758
Allow for getting/setting indexed properties of objects using get/set_indexed
Performance is around the same as using pure set() through GDScript.
2017-11-21 20:58:21 +02:00
Ruslan Mustakov d42c5646a5 Return and repair file logging
And make it configurable, too.
2017-11-21 16:43:44 +07:00
Ferenc Arn d28763a4c1 Rename Rect3 to AABB.
Fixes #12973.
2017-11-17 11:01:41 -05:00
Leon Krause 2970061a73 Implement HTTPClient in HTML5 platform
Limitations:

 - Subject to same-origin policy
 - No persistent connection (but simulated for compatibility)
 - No blocking mode
 - No StreamPeer access
 - No chunked responses
 - Cannot disable host verification
2017-11-13 00:58:29 +01:00
Geequlim f7168bf217 Add indent and sort keys support for JSON.print 2017-11-07 11:52:45 +08:00
Karroffel 1386647cdf make ConfigFile sections ordered 2017-11-04 14:08:21 +01:00
Karroffel 38d56c8351 make ConfigFile use OrderedHashMap 2017-11-03 14:33:19 +01:00
Rémi Verschelde 568e905604
Merge pull request #12423 from tagcup/zstd_1.3.2
Update zstd to 1.3.2.
2017-10-27 20:28:59 +02:00
Ferenc Arn f3436a841a Add an option to use zstd's recently introduced long range matching (off by default). 2017-10-27 12:26:13 -04:00
Ferenc Arn 01815e9b5f Update zstd to 1.3.2. 2017-10-26 16:41:47 -04:00