809a9f6907
The networking API restrictions imposed by the allowNetworking parameter & attribute have been added and partially implemented. A new NetworkingRestrictionMode enum has been added to Ruffle (in Rust and Typescript). It contains the values "All", "Internal" and "None" and models the possible values of the allowNetworking parameter / attribute. All means that all networking APIs are permitted in the SWF file, Internal means that the SWF file may not call browser navigation or browser interaction APIs and None means the same and that the SWF file cannot use any SWF-to-SWF communication APIs either. A respective allowNetworking variable has been added to the JS config. Its default value is All. Ruffle now recognises the allowNetworking parameter and attribute in the SWF HTML object and parses it and sets the config variable correspondingly if it's recognised. Only if the variable is set to All, the external interface (responsible for javascript calls in AS3) is created. Additionally, the variable is given to the WebNavigatorBackend and saved in it. The navigator denies all navigate_to_url calls if the variable hasn't been set to All. Therefore, the API restrictions imposed by setting allowNetworking to internal or none have been partially implemented. Formatting has been improved. |
||
---|---|---|
.. | ||
core | ||
demo | ||
extension | ||
selfhosted |