Package: calibre / 6.13.0+repack-2+deb12u4

0019-Return-None-if-IP-address-string-is-None.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
From: YOKOTA Hiroshi <yokota.hgml@gmail.com>
Date: Sun, 23 Oct 2022 01:57:14 +0900
Subject: Return None if IP address string is None

"ip_address" parameter is None when content server config value
"listen_on" is blank string.
---
 src/calibre/utils/mdns.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/calibre/utils/mdns.py b/src/calibre/utils/mdns.py
index 051e505..4233a3e 100644
--- a/src/calibre/utils/mdns.py
+++ b/src/calibre/utils/mdns.py
@@ -77,6 +77,9 @@ def _get_external_ip():
 
 
 def verify_ipV4_address(ip_address):
+    if ip_address == None:
+        return None
+
     result = None
     if ip_address != '0.0.0.0' and ip_address != '::':
         # do some more sanity checks on the address