Tim Rühsen
526768cc5d
Use TR46 non-transitional with libidn2 >= 0.14
...
I changed my mind after talking with the cURL
maintainer Daniel Stenberg.
See https://github.com/curl/curl/pull/1207
2017-01-14 15:47:44 +01:00
Tim Rühsen
2c17d56234
Use TR46 transitional with libidn2 >= 0.14
2017-01-03 12:30:43 +01:00
Tim Rühsen
ff29f13d8f
Add functions psl_latest() and psl_dist_filename()
...
Also add a new ./configure function to set a distribution wide
PSL file used by psl_latest(): --with-psl-distfile
If possible that filename should point to a DAFSA PSL file that
becomes updated regularly.
2016-12-06 20:16:12 +01:00
Tim Rühsen
deabd4a546
Replace psl2c by psl-make-dafsa
...
Removed --input-format from psl-make-dafsa.
Added --output-format=cxx+ to psl-make-dafsa.
Removed psl2c.
2016-12-06 15:22:18 +01:00
Tim Rühsen
6490b8214b
Don't taint out variable on error in psl_str_to_utf8lower()
...
Fixes #71
2016-12-05 16:28:47 +01:00
Tim Rühsen
2a3a743643
Fix typo Publix -> Public
2016-12-05 15:01:27 +01:00
Frederic Cambus
9f0b09e830
Missing includes for in6_addr / AF_INET*, fixes compilation on OpenBSD
2016-12-02 19:11:18 +01:00
Tim Rühsen
65e785e1ca
Replace NFCK -> NFKC in the docs
2016-11-29 14:49:35 +01:00
Tim Rühsen
5d32b80077
Make API docs more detailed
2016-11-14 12:08:20 +01:00
Tim Rühsen
2c871b1306
Skip conversion in _psl_is_public_suffix() for builtin psl context
2016-11-06 11:59:36 +01:00
Tim Rühsen
4b42762cbf
Skip punycode conversion for _psl_is_public_suffix() if data contains UTF-8 rules
2016-11-05 10:37:01 +01:00
Tim Rühsen
598a78b2de
Add better test code coverage
2016-09-26 15:15:34 +02:00
Tim Rühsen
5ebc24f0e0
Code cleanup in libidn2 branch of _psl_idna_toASCII()
...
Reported-by: https://github.com/daurnimator
2016-09-26 10:13:43 +02:00
Tim Rühsen
7eb8592035
Let u8_tolower() allocate the result buffer.
...
Reported-by: https://github.com/daurnimator
2016-09-25 19:44:33 +02:00
Tim Rühsen
32543dd5a5
Avoid unneeded memory allocactions in psl_str_to_utf8lower()
...
Reported-by: https://github.com/daurnimator
2016-09-25 12:49:56 +02:00
Tim Rühsen
1baaacccd5
Fix libidn/libidn2 code path of psl_str_to_utf8lower()
...
* fixing memory leaks
* proper handling of unterminated results of u8_tolower()
* second call to iconv() ensures flush of internal memory
* check more code paths of psl_str_to_utf8lower() via
tests/test-registrable-domain.c
2016-09-23 12:35:08 +02:00
Tim Rühsen
e2812e8c4c
Check return value for strdup and strndup
...
Fixes #60
Reported-by: https://github.com/daurnimator
2016-09-22 15:53:31 +02:00
Tim Rühsen
351b3fb912
Remove redundant define of countof()
2016-09-22 11:37:23 +02:00
Tim Rühsen
9e1ca81be4
Remove memory allocations from _utf8_to_utf32()
...
Reported-by: https://github.com/daurnimator
2016-09-22 11:19:52 +02:00
Tim Rühsen
6cfb33e530
Amend API docs to be more precise about invalid input.
...
Fixes #59
Reported-by: https://github.com/daurnimator
2016-09-21 12:03:00 +02:00
Tim Rühsen
10f7b5fe7c
Fallback to malloc from alloca for larger memory chunks
...
Fixes #58
Reported-by: https://github.com/daurnimator
2016-09-21 11:54:39 +02:00
Tim Rühsen
1ab7be5641
Check malloc/realloc results in src/psl.c
...
Fixes #57
Reported-by: https://github.com/daurnimator
2016-09-21 11:15:43 +02:00
Tim Rühsen
8dba092c73
Add magic header to DAFSA binary files
2016-07-13 11:14:18 +02:00
Daniel Kahn Gillmor
dc9cc02982
s/publix/public/
2016-07-06 15:32:51 +02:00
Daniel Kahn Gillmor
248327e4aa
use https where possible
2016-07-06 15:32:51 +02:00
Tim Rühsen
95a5152e56
Update copyright year to 2016
2016-01-02 13:36:49 +01:00
Tim Rühsen
96e0848d81
Release unused memory after loading DAFSA data
2016-01-02 13:31:53 +01:00
Tim Rühsen
748e3ae9cc
Load DAFSA precompiled files (auto-detection)
2016-01-01 22:38:21 +01:00
Tim Rühsen
cde5e53ea6
Remove psl_builtin_compile_time() for reproducable builds
2016-01-01 15:44:24 +01:00
Tim Rühsen
c699e3c441
Add --input-format and --output-format to make_dafsa.py
2015-12-30 17:52:48 +01:00
Tim Rühsen
5363290cbe
Remove debugging printf
2015-12-26 14:29:10 +01:00
Tim Rühsen
093d5eac3d
Fix ./configure --disable-runtime
...
Added runtime punycode generation code from
http://www.nicemice.net/idn/punycode-spec.gz
2015-12-26 14:15:08 +01:00
Daniel Kahn Gillmor
01a3751524
re-fix psl_builtin_outdated()
2015-12-11 22:59:15 -05:00
Tim Rühsen
0ca3741df6
Use DAWG/DAFSA format for builtin data
...
This data representation reduces the size of the PSL data
drastically and still allows fast lookups.
2015-12-09 09:35:04 +01:00
Tim Rühsen
9d2e93f0b8
New function psl_is_public_suffix2()
...
The current PSL has two sections, ICANN and PRIVATE.
This new function allows to limit the check for one or both
of these sections.
2015-12-06 21:55:56 +01:00
Tim Rühsen
dbefdb6767
Remove include of bits/stat.h
2015-11-19 10:06:04 +01:00
Tim Rühsen
643e523f09
Fix psl_builtin_outdated()
2015-09-27 19:14:13 +02:00
Tim Rühsen
53c2fe31a8
Update copyright years
2015-09-23 14:50:01 +02:00
Tim Rühsen
00b9cfb119
Add function psl_check_version_number()
2015-09-23 14:04:17 +02:00
Tim Rühsen
6a8f33ee39
Add new function psl_builtin_outdated()
2015-09-19 14:00:49 +02:00
Tim Rühsen
34289fa59b
Add function psl_suffix_wildcard_count()
2015-09-19 10:55:09 +02:00
Tim Rühsen
e443d21b61
Code cleanup, faster lookups
2015-09-19 10:50:00 +02:00
Tim Rühsen
597709cb11
Support combination of foo.bar and *.foo.bar
2015-09-15 14:49:53 +02:00
Daniel Kahn Gillmor
ac8ba5a828
Documentation cleanup
2015-08-12 10:06:49 +02:00
Tim Rühsen
3f5e208967
src/psl.c: Fix C99 comment to C89
2015-08-06 12:31:21 +02:00
Tim Rühsen
998b5515d7
Work around a libidn<=1.30 vulnerability
2015-07-06 13:03:50 +02:00
Giuseppe Scrivano
7a07205f1b
psl.c: fix strndup replacement
...
Do not copy more bytes than the src string length.
2015-02-28 18:52:47 +01:00
Giuseppe Scrivano
225c557e23
psl.c: Do not define _GNU_SOURCE
2015-02-28 18:37:14 +01:00
Tim Rühsen
067f6aee9c
Don't use locale dependent isspace()
...
Fixes an issue on Solaris
Reported-by: Dagobert Michelsen <dam@opencsw.org>
2015-01-26 11:05:32 +01:00
Tim Rühsen
910c4b37b6
add strndup() compatibility code
2015-01-23 15:05:02 +01:00