Skip to content

Commit 367ddcd

Browse files
shihai1991agentzhviperetjeremywohlitpp16
authored
BUG1234: Resource leaks
* updated util/build.sh. * minor tweaks. * documented set_md5 directive in README. * updated .gitignore. * confirmed that we work with 1.0.2. * fixed a typo in README found by cyberty. * applied a modified version of the patch from Vitaly Peretiatko. * documented the new set_random directive in README and also added a test case for zero number arguments. * now we check the ngx_devel_kit dependency at config time and provide a more friendly error message if it is missing. inspired by github issue openresty#5. * minor error message tweaks. * implemented the set_misc_base32_padding directive that can control whether to pad left-over bytes when encoding a base32 digest. thanks David Yu for suggesting it. * added tests for the new set_misc_base32_padding directive. * documented the set_misc_base32_padding directive in README. * checked in NginxHttpSetMiscModule.wiki and README.markdown. * minor code and test cleanup. * sync'd docs from the wiki page. * fixed the Installation section in docs: we require ngx_devel_kit. * fixed the Installation section in docs: we require http_ssl_module too. * updated README.markdown and README accordingly. * renamed the wiki page. * updated links in docs. * fixed the "<" and ">" symbols in the markdown doc. * minor coding style fixes. * updated docs to state that we work with nginx 1.0.8 and 1.1.5. * fixed ddebug code in hmac.c. thanks eklinger for reporting it as github issue openresty#7. * fixed the download page links in docs. * converted CRLF in the source files and test files to LF. also fixed one place that does not check the pointer returned by the memory allocator. * allow use of the DDEBUG macro from the outside (via the "-D DDEBUG=1" cc opton). * added new directive set_rotate $value $from $to * Added some documentation for set_rotate * bugfix: we should omit the set_sha1 directive when we do not have any SHA1 libraries (including OpenSSL) installed. thanks runner-mei for reporting this in github issue openresty#9. * Add cryptographically strong random string functions. * bugfix: compilation error on SHA_DIGEST_LENGTH when sha1 library is missing. thanks runner-mei for reporting in github issue openresty#9. * various fixes in the patches from viperet for the new set_rotate directive. * feature: the set_rotate directive will always make the current value persistent and make use of it when either the current value is not given or the current value is invalid. * added a test for set_rotate: current value persistency is per location. * updated docs to reflect recent changes. * updated valgrind.suppress. * various coding style fixes in Jeremy Wohl's patch for cryptographically strong random string functions in github pull request openresty#10. * added guard macros for the C headers in github pull request openresty#10. * updated docs to reflect recent changes in github pull request openresty#10. * config: added ngx_http_set_secure_random.h to the NGX_ADDON_DEPS variable value, which was added in github pull request openresty#10. * updated valgrind.suppress for the "hup reload" + valgrind/memcheck testing mode. * updated valgrind.suppress further for linux i386. * updated valgrind.suppress further for linux i386. * minor coding style fixes. * updated .gitignore. * updated valgrind.supress for valgrind 3.8.0. * bugfix: we did not escape '\0', '\z', '\b', and '\t' properly in set_quote_sql_str according to the MySQL quoting rules. * updated .gitignore a bit. * massive coding style fixes. * suppressed a clang warning and also refactoried the code for pgsql string quoting a bit. * updated docs to reflect recent changes. * docs: fixed the in-page links in the markdown version. * docs: no longer use external links to wiki.nginx.org wherever possible. * docs: markdown: made the module names more readable. * doc: markdown: added a "table of contents" seciton and lots of "Back to TOC" links. * minor coding style fixes and also made ngx_http_set_misc_set_secure_random_common a static function. * doc: markdown tweaks. * feature: added new config directives set_formatted_gmt_time and set_formatted_local_time. thanks Trurl McByte for the patch in openresty#11. * doc: documented the set_formatted_gmt_time and set_formatted_local_time. * updated docs to reflect recent changes and also bumped version number to 0.23. * minor coding style fixes. * bugfix: fixed the warnings from the Microsoft C compiler. thanks Edwin Cleton for the report. * bugfix: fixed another warning from the Microsoft C compiler. thanks Edwin Cleton for the report. * updated docs to reflect recent changes. * minor coding style fixes. * suppressed a valgrind false positive in libdl. * bugfix: fixed source and test files' permission. they should not be executable at all. thanks Christos Kontas for the report in openresty#16. * change: set_escape_uri: use uppercase hexadecimal digits for percent-encoding as per RFC 3986. thanks splitice for the original patch in openresty#17. * updated docs to reflect recent changes. * minor coding style fixes. * updated .gitignore. * bugfix: create_loc_conf did not return NULL on error. thanks Markus Linnala for the patch in openresty#18. * doc: v0.26 release. * bugfix: fixed build failure when --with-mail_ssl_module is specified while --with-http_ssl_module is not. thanks Xiaochen Wang for the report in openresty#22. * bumped version to 0.27. * removed the README file. * some minor coding style fixes. * doc: minor tweaks in the markdown format. * feature: added the set_base32_alphabet config directive to allow the user to specify the alphabet used for base32 encoding/decoding. thanks Vladislav Manchev for the patch in openresty#20. * change: the set_misc_base32_padding directive is now deprecated; use set_base32_padding instead. * bugfix: we did not check the alphabet length in directive "set_base_alphabet". this is a follow-up fix for commit 43c3039 (openresty#20). * tests: fixed a misuse of the repeat_each() function. * Update ngx_http_set_misc_module.c objs/lib/set-misc-nginx-module/src/ngx_http_set_misc_module.c(511) : warning C4244: '=' : conversion from 'ngx_uint_t' to 'u_char', possible loss of data * bugfix: set_quote_sql_str: we incorrectly escaped 0x1a to \z instead of \Z. * doc: bumped version to 0.28. * add openssl hmac defensive test md_len might be uninitialized. It might not be set at HMAC if something goes wrong. Later it is used at memory allocation and memcpy and uninitialized variable breaks havoc there. * fixed compatibility issues with nginx 1.7.11+ configured with --with-threads. * doc: bumped version to 0.29; also stated that we work with nginx 1.7.10. * bugfix: fixed errors and warnings with C compilers without variadic macro support. * added a .gitattributes file to correct GitHub's language tag. * doc: various updates. * config: refactoring. * feature: this module can now be compiled as a dynamic module with NGINX 1.9.11+ via the --with-dynamic-module=PATH option of ./configure. * config: updated for dynamically-built NDK. * some doc love. * removed doc/HttpSetMiscModule.wiki. * various coding style fixes. * doc: bumped version to 0.30. * feature: added travis-ci support. Signed-off-by: Yichun Zhang (agentzh) <[email protected]> * bugfix: the "set_sha1" directive is always disabled when working with nginx 1.11.2+ due to recent changes in the new nginx cores. * doc: bumped version to 0.31. * doc: updated copyright notice. * tests: suppressed a valgrind false positive in the latest nginx core. * tests: minor tweaks in valgrind.suppress. * tests: valgrind.suppress: removed too aggressive suppressions in nginx mem pools and luajit lj_str_new. * tests: added new valgrind false positives in the latest nginx core. * bugfix: fixed the -Wimplicit-fallthrough warinings from GCC 7. Signed-off-by: Yichun Zhang (agentzh) <[email protected]> * refactor: made ngx_http_pg_utf_islegal() much better. * doc: we work with nginx cores as new as at least 1.13.6. * bugfix: set_quote_pgsql_str: we did not escape the `$` character. Signed-off-by: Yichun Zhang (agentzh) <[email protected]> * tests: formatted with the `reindex` tools. Signed-off-by: Yichun Zhang (agentzh) <[email protected]> * travis: upgraded the nginx core to 1.13.6. Signed-off-by: Yichun Zhang (agentzh) <[email protected]> * doc: bumped version to 0.32. * doc: updated the link to ngx_devel_kit. Signed-off-by: Yichun Zhang (agentzh) <[email protected]> * doc: fixed a few typos in readme. * travis: bumped the nginx core version to 1.15.8. * travis: bumped the nginx core version to 1.17.1. * Fix a possible resource leak of fd Co-authored-by: agentzh (章亦春) <[email protected]> Co-authored-by: viperet <[email protected]> Co-authored-by: Jeremy Wohl <[email protected]> Co-authored-by: itpp16 <[email protected]> Co-authored-by: Markus Linnala <[email protected]> Co-authored-by: Ilya Shipitsin <[email protected]> Co-authored-by: Andrei Belov <[email protected]> Co-authored-by: Yuansheng <[email protected]> Co-authored-by: Adam Leskis <[email protected]> Co-authored-by: Thibault Charbonnier <[email protected]>
1 parent 1e9c386 commit 367ddcd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+4895
-1275
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.t linguist-language=Text

.gitignore

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ update-readme
1919
test/Makefile
2020
test/blib
2121
test.sh
22-
t.sh
22+
all
2323
t/t.sh
2424
test/t/servroot/
2525
releng
@@ -56,3 +56,17 @@ src/hex.c
5656
src/hex.h
5757
src/hmac.c
5858
src/hmac.h
59+
src/rotate.[ch]
60+
analyze
61+
buildroot/
62+
src/module.h
63+
work/
64+
src/random.[ch]
65+
build1[0-9]
66+
nginx
67+
analyze
68+
src/rotate.[ch]
69+
*.plist
70+
Makefile
71+
src/base64url.[ch]
72+
src/expired.[ch]

.travis.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
sudo: required
2+
dist: trusty
3+
4+
os: linux
5+
6+
language: c
7+
8+
compiler:
9+
- gcc
10+
- clang
11+
12+
env:
13+
global:
14+
- LUAJIT_PREFIX=/opt/luajit21
15+
- LUAJIT_LIB=$LUAJIT_PREFIX/lib
16+
- LD_LIBRARY_PATH=$LUAJIT_LIB:$LD_LIBRARY_PATH
17+
- LUAJIT_INC=$LUAJIT_PREFIX/include/luajit-2.1
18+
- LUA_INCLUDE_DIR=$LUAJIT_INC
19+
- LUA_CMODULE_DIR=/lib
20+
- JOBS=3
21+
- NGX_BUILD_JOBS=$JOBS
22+
- TEST_NGINX_SLEEP=0.006
23+
matrix:
24+
- NGINX_VERSION=1.17.1
25+
26+
before_install:
27+
- sudo apt-get install -qq -y axel cpanminus libtest-base-perl libtext-diff-perl liburi-perl libwww-perl libtest-longstring-perl liblist-moreutils-perl > build.log 2>&1 || (cat build.log && exit 1)
28+
29+
install:
30+
- git clone https://github.com/openresty/nginx-devel-utils.git
31+
- git clone https://github.com/openresty/openresty.git ../openresty
32+
- git clone https://github.com/openresty/no-pool-nginx.git ../no-pool-nginx
33+
- git clone https://github.com/simpl/ngx_devel_kit.git ../ndk-nginx-module
34+
- git clone https://github.com/openresty/test-nginx.git
35+
- git clone -b v2.1-agentzh https://github.com/openresty/luajit2.git
36+
- git clone https://github.com/openresty/lua-nginx-module.git ../lua-nginx-module
37+
- git clone https://github.com/openresty/lua-resty-core.git ../lua-resty-core
38+
- git clone https://github.com/openresty/lua-resty-lrucache.git ../lua-resty-lrucache
39+
- git clone https://github.com/openresty/echo-nginx-module.git ../echo-nginx-module
40+
- git clone https://github.com/calio/iconv-nginx-module.git ../iconv-nginx-module
41+
42+
script:
43+
- cd luajit2
44+
- make -j$JOBS CCDEBUG=-g Q= PREFIX=$LUAJIT_PREFIX CC=$CC XCFLAGS='-DLUA_USE_APICHECK -DLUA_USE_ASSERT' > build.log 2>&1 || (cat build.log && exit 1)
45+
- sudo make install PREFIX=$LUAJIT_PREFIX > build.log 2>&1 || (cat build.log && exit 1)
46+
- cd ../test-nginx && sudo cpanm . && cd ..
47+
- export PATH=$PWD/work/nginx/sbin:$PWD/nginx-devel-utils:$PATH
48+
- export NGX_BUILD_CC=$CC
49+
- sh util/build.sh $NGINX_VERSION > build.log 2>&1 || (cat build.log && exit 1)
50+
- nginx -V
51+
- prove -r t

README

Lines changed: 0 additions & 306 deletions
This file was deleted.

0 commit comments

Comments
 (0)