1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-11-15 22:05:39 +00:00

Co-authored-by: Julián Romero Parejo <julrompar@alum.us.es>

Co-authored-by: FernandoTC18 <FernandoTC18@users.noreply.github.com>
Changes for maintenance and protocols security problems
This commit is contained in:
josemgarciar 2024-03-08 10:52:58 +01:00
parent f0812d7848
commit f0afdbf6ac
3 changed files with 7 additions and 7 deletions

View file

@ -54,7 +54,7 @@ LPTSTR = ctypes.c_wchar_p
START_CALLBACK = ctypes.WINFUNCTYPE(None, ctypes.c_int, ctypes.POINTER(LPTSTR))
class SERVICE_TABLE_ENTRY(ctypes.Structure):
class ServiceTableEntry(ctypes.Structure):
_fields_ = [
('lpServiceName', LPTSTR),
('lpServiceProc', START_CALLBACK)
@ -183,12 +183,12 @@ def win_service_start(service_name, real_main):
try:
cb = START_CALLBACK(
functools.partial(win_service_main, service_name, real_main))
dispatch_table = _ctypes_array(SERVICE_TABLE_ENTRY, [
SERVICE_TABLE_ENTRY(
dispatch_table = _ctypes_array(ServiceTableEntry, [
ServiceTableEntry(
service_name,
cb
),
SERVICE_TABLE_ENTRY(None, ctypes.cast(None, START_CALLBACK))
ServiceTableEntry(None, ctypes.cast(None, START_CALLBACK))
])
if not advapi32.StartServiceCtrlDispatcherW(dispatch_table):

View file

@ -26,7 +26,7 @@ class MinotoIE(InfoExtractor):
continue
container = fmt.get('container')
if container == 'hls':
formats.extend(fmt_url, video_id, 'mp4', m3u8_id='hls', fatal=False)
formats.extend([fmt_url, video_id, 'mp4'], m3u8_id='hls', fatal=False)
else:
fmt_profile = fmt.get('profile') or {}
formats.append({

View file

@ -2372,7 +2372,7 @@ def make_HTTPS_handler(params, **kwargs):
if sys.version_info < (3, 2):
return YoutubeDLHTTPSHandler(params, **kwargs)
else: # Python3 < 3.4
context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
context = ssl.SSLContext(ssl.PROTOCOL_TLSv1_2)
context.verify_mode = (ssl.CERT_NONE
if opts_no_check_certificate
else ssl.CERT_REQUIRED)
@ -2593,7 +2593,7 @@ def _create_http_connection(ydl_handler, http_class, is_https, *args, **kwargs):
if is_https:
self.sock = ssl.wrap_socket(
sock, self.key_file, self.cert_file,
ssl_version=ssl.PROTOCOL_TLSv1)
ssl_version=ssl.PROTOCOL_TLSv1_2)
else:
self.sock = sock
hc.connect = functools.partial(_hc_connect, hc)