A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/openresty/xss-nginx-module/commit/4349b2a9ad0ee63e35fdb1c24a3f2363904a86b2 below:

now we use "signed char" explicitly instead of the vague "char" type. · openresty/xss-nginx-module@4349b2a · GitHub

File tree Expand file treeCollapse file tree 5 files changed

+18

-14

lines changed

Filter options

Expand file treeCollapse file tree 5 files changed

+18

-14

lines changed Original file line number Diff line number Diff line change

@@ -192,7 +192,7 @@ ngx_http_xss_header_filter(ngx_http_request_t *r)

192 192

callback.data = p;

193 193

callback.len = dst - p;

194 194 195 -

if (ngx_http_xss_test_callback((char *) callback.data, callback.len)

195 +

if (ngx_http_xss_test_callback(callback.data, callback.len)

196 196

!= NGX_OK)

197 197

{

198 198

ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,

Original file line number Diff line number Diff line change

@@ -18,19 +18,21 @@ static const int javascript_en_main = 1;

18 18 19 19

#line 8 "src/ngx_http_xss_util.rl"

20 20 21 -

ngx_int_t ngx_http_xss_test_callback(char *data, size_t len)

21 +

ngx_int_t ngx_http_xss_test_callback(u_char *data, size_t len)

22 22

{

23 -

char *p = data;

24 -

char *pe = data + len;

23 +

signed char *p = (signed char *) data;

24 +

signed char *pe;

25 25

int cs;

26 26 27 +

pe = p + len;

28 + 27 29 28 -

#line 29 "src/ngx_http_xss_util.c"

30 +

#line 31 "src/ngx_http_xss_util.c"

29 31

{

30 32

cs = javascript_start;

31 33

}

32 34 33 -

#line 34 "src/ngx_http_xss_util.c"

35 +

#line 36 "src/ngx_http_xss_util.c"

34 36

{

35 37

if ( p == pe )

36 38

goto _test_eof;

@@ -126,13 +128,13 @@ case 5:

126 128

_out: {}

127 129

}

128 130 129 -

#line 27 "src/ngx_http_xss_util.rl"

131 +

#line 29 "src/ngx_http_xss_util.rl"

130 132 131 133 132 134

if (cs <

133 -

#line 134 "src/ngx_http_xss_util.c"

135 +

#line 136 "src/ngx_http_xss_util.c"

134 136

6

135 -

#line 29 "src/ngx_http_xss_util.rl"

137 +

#line 31 "src/ngx_http_xss_util.rl"

136 138

|| p != pe) {

137 139

return NGX_DECLINED;

138 140

}

Original file line number Diff line number Diff line change

@@ -14,7 +14,7 @@

14 14

#endif

15 15 16 16 17 -

ngx_int_t ngx_http_xss_test_callback(char *data, size_t len);

17 +

ngx_int_t ngx_http_xss_test_callback(u_char *data, size_t len);

18 18 19 19 20 20

#endif /* NGX_HTTP_XSS_UTIL_H */

Original file line number Diff line number Diff line change

@@ -6,12 +6,14 @@

6 6

%% machine javascript;

7 7

%% write data;

8 8 9 -

ngx_int_t ngx_http_xss_test_callback(char *data, size_t len)

9 +

ngx_int_t ngx_http_xss_test_callback(u_char *data, size_t len)

10 10

{

11 -

char *p = data;

12 -

char *pe = data + len;

11 +

signed char *p = (signed char *) data;

12 +

signed char *pe;

13 13

int cs;

14 14 15 +

pe = p + len;

16 + 15 17

%%{

16 18

identifier = [$A-Za-z_] [$A-Za-z0-9_]*;

17 19 Original file line number Diff line number Diff line change

@@ -14,7 +14,7 @@ version=$1

14 14

force=$2

15 15 16 16

ngx-build $force $version \

17 -

--with-cc-opt="-O3" \

17 +

--with-cc-opt="-O3 -funsigned-char" \

18 18

--without-mail_pop3_module \

19 19

--without-mail_imap_module \

20 20

--without-mail_smtp_module \

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4