mirror of
https://github.com/openwrt/packages.git
synced 2026-10-14 12:06:51 +04:00
Hardens the reader against crafted databases: decoding now caps a record at 65536 values, 512 levels of nesting and 2 MiB of string and bytes payload, rejects unsigned integers over 16 bytes and signed ones over 4 bytes before reading their payload, and rejects an invalid search tree size when opening a database. Those, and the truncated reads that used to surface as IndexError or struct.error, all raise InvalidDatabaseError now. Upstream vendors libmaxminddb 1.14.0 for the same limits in the C extension; this package links the feed's libmaxminddb instead, so that half arrives with a libmaxminddb bump. Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
44 lines
1.0 KiB
Makefile
44 lines
1.0 KiB
Makefile
#
|
|
# Copyright (C) 2019-2020 CZ.NIC z.s.p.o. (http://www.nic.cz/)
|
|
#
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
# See /LICENSE for more information.
|
|
#
|
|
#
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
PKG_NAME:=python-maxminddb
|
|
PKG_VERSION:=3.2.0
|
|
PKG_RELEASE:=1
|
|
|
|
PYPI_NAME:=maxminddb
|
|
PKG_HASH:=d28e0073fd1dd637c8b95947bc864b5625eca9f8f2db1538145e33b2a1cd4b92
|
|
|
|
PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
|
|
PKG_LICENSE:=Apache-2.0
|
|
PKG_LICENSE_FILES:=LICENSE
|
|
|
|
PKG_BUILD_DEPENDS:=python-setuptools-scm/host
|
|
|
|
include ../pypi.mk
|
|
include $(INCLUDE_DIR)/package.mk
|
|
include ../python3-package.mk
|
|
|
|
define Package/python3-maxminddb
|
|
SECTION:=lang
|
|
CATEGORY:=Languages
|
|
SUBMENU:=Python
|
|
TITLE:=Reader for the MaxMind DB format
|
|
URL:=https://www.maxmind.com/
|
|
DEPENDS:=+python3-light +python3-urllib +libmaxminddb
|
|
endef
|
|
|
|
define Package/python3-maxminddb/description
|
|
Module for reading MaxMind DB files
|
|
endef
|
|
|
|
$(eval $(call Py3Package,python3-maxminddb))
|
|
$(eval $(call BuildPackage,python3-maxminddb))
|
|
$(eval $(call BuildPackage,python3-maxminddb-src))
|