mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-17 13:51:09 +02:00
Complain about http:// URL bases when enforce_https=true
This commit is contained in:
@@ -24,6 +24,7 @@ conf_data.set('ALLOW_FAKE_NEWER_VERSION', (is_snapshot or is_beta or is_debug or
|
|||||||
conf_data.set('IDENT_PLATFORM', ident_platform)
|
conf_data.set('IDENT_PLATFORM', ident_platform)
|
||||||
conf_data.set('IDENT', '@0@-@1@-@2@'.format(host_arch, host_platform, host_libc).to_upper())
|
conf_data.set('IDENT', '@0@-@1@-@2@'.format(host_arch, host_platform, host_libc).to_upper())
|
||||||
|
|
||||||
|
enforce_https = get_option('enforce_https')
|
||||||
server = get_option('server')
|
server = get_option('server')
|
||||||
static_server = get_option('static_server')
|
static_server = get_option('static_server')
|
||||||
update_server = get_option('update_server')
|
update_server = get_option('update_server')
|
||||||
@@ -31,9 +32,15 @@ update_server = get_option('update_server')
|
|||||||
if not (server.startswith('http://') or server.startswith('https://'))
|
if not (server.startswith('http://') or server.startswith('https://'))
|
||||||
server = 'https://' + server
|
server = 'https://' + server
|
||||||
endif
|
endif
|
||||||
|
if server.startswith('http://') and enforce_https
|
||||||
|
error('enforce_https is true but server is a http:// URL base')
|
||||||
|
endif
|
||||||
if not (static_server.startswith('http://') or static_server.startswith('https://'))
|
if not (static_server.startswith('http://') or static_server.startswith('https://'))
|
||||||
static_server = 'https://' + static_server
|
static_server = 'https://' + static_server
|
||||||
endif
|
endif
|
||||||
|
if static_server.startswith('http://') and enforce_https
|
||||||
|
error('enforce_https is true but static_server is a http:// URL base')
|
||||||
|
endif
|
||||||
|
|
||||||
use_update_server = false
|
use_update_server = false
|
||||||
if update_server != ''
|
if update_server != ''
|
||||||
@@ -41,12 +48,14 @@ if update_server != ''
|
|||||||
if not (update_server.startswith('http://') or update_server.startswith('https://'))
|
if not (update_server.startswith('http://') or update_server.startswith('https://'))
|
||||||
update_server = 'https://' + update_server
|
update_server = 'https://' + update_server
|
||||||
endif
|
endif
|
||||||
|
if update_server.startswith('http://') and enforce_https
|
||||||
|
error('enforce_https is true but update_server is a http:// URL base')
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
conf_data.set('USE_UPDATESERVER', use_update_server.to_string())
|
conf_data.set('USE_UPDATESERVER', use_update_server.to_string())
|
||||||
conf_data.set('UPDATESERVER', update_server)
|
conf_data.set('UPDATESERVER', update_server)
|
||||||
|
|
||||||
platform_clipboard = get_option('platform_clipboard')
|
platform_clipboard = get_option('platform_clipboard')
|
||||||
enforce_https = get_option('enforce_https')
|
|
||||||
allow_quit = true
|
allow_quit = true
|
||||||
force_window_frame_ops = 'forceWindowFrameOpsNone'
|
force_window_frame_ops = 'forceWindowFrameOpsNone'
|
||||||
allow_data_folder = true
|
allow_data_folder = true
|
||||||
|
Reference in New Issue
Block a user