Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nghttp2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
nghttp2
Commits
2fb750f2
Commit
2fb750f2
authored
Aug 02, 2014
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nghttp2_check_header_value: Disallow 0x00
parent
7c781bcd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
8 deletions
+4
-8
lib/includes/nghttp2/nghttp2.h
lib/includes/nghttp2/nghttp2.h
+2
-6
lib/nghttp2_helper.c
lib/nghttp2_helper.c
+1
-1
tests/nghttp2_helper_test.c
tests/nghttp2_helper_test.c
+1
-1
No files found.
lib/includes/nghttp2/nghttp2.h
View file @
2fb750f2
...
...
@@ -2774,8 +2774,7 @@ int nghttp2_is_fatal(int lib_error);
* @function
*
* Returns nonzero if HTTP header field name |name| of length |len| is
* valid according to
* http://tools.ietf.org/html/draft-ietf-httpbis-p1-messaging-25#section-3.2
* valid according to http://tools.ietf.org/html/rfc7230#section-3.2
*
* Because this is a header field name in HTTP2, the upper cased alphabet
* is treated as error.
...
...
@@ -2787,10 +2786,7 @@ int nghttp2_check_header_name(const uint8_t *name, size_t len);
*
* Returns nonzero if HTTP header field value |value| of length |len|
* is valid according to
* http://tools.ietf.org/html/draft-ietf-httpbis-p1-messaging-25#section-3.2
*
* Because this is HTTP2 header field value, it can contain NULL
* character (0x00).
* http://tools.ietf.org/html/rfc7230#section-3.2
*/
int
nghttp2_check_header_value
(
const
uint8_t
*
value
,
size_t
len
);
...
...
lib/nghttp2_helper.c
View file @
2fb750f2
...
...
@@ -324,7 +324,7 @@ int nghttp2_check_header_name(const uint8_t *name, size_t len)
}
static
int
VALID_HD_VALUE_CHARS
[]
=
{
1
/* NUL */
,
0
/* SOH */
,
0
/* STX */
,
0
/* ETX */
,
0
/* NUL */
,
0
/* SOH */
,
0
/* STX */
,
0
/* ETX */
,
0
/* EOT */
,
0
/* ENQ */
,
0
/* ACK */
,
0
/* BEL */
,
0
/* BS */
,
1
/* HT */
,
0
/* LF */
,
0
/* VT */
,
0
/* FF */
,
0
/* CR */
,
0
/* SO */
,
0
/* SI */
,
...
...
tests/nghttp2_helper_test.c
View file @
2fb750f2
...
...
@@ -172,7 +172,7 @@ void test_nghttp2_check_header_name(void)
void
test_nghttp2_check_header_value
(
void
)
{
uint8_t
goodval
[]
=
{
'a'
,
'
\0'
,
'
b'
,
0x80u
,
'c'
,
0xffu
,
'd'
,
'\t'
,
' '
};
uint8_t
goodval
[]
=
{
'a'
,
'b'
,
0x80u
,
'c'
,
0xffu
,
'd'
,
'\t'
,
' '
};
uint8_t
badval1
[]
=
{
'a'
,
0x1fu
,
'b'
};
uint8_t
badval2
[]
=
{
'a'
,
0x7fu
,
'b'
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment