Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nginx-push-stream-module
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
nginx-push-stream-module
Commits
754357ec
Commit
754357ec
authored
Jul 06, 2015
by
Wandenberg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allways unmask the frame and check if is a valid utf8
parent
020a6882
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
ngx_http_push_stream_module_websocket.c
src/ngx_http_push_stream_module_websocket.c
+8
-8
No files found.
src/ngx_http_push_stream_module_websocket.c
View file @
754357ec
...
...
@@ -289,17 +289,17 @@ ngx_http_push_stream_websocket_reading(ngx_http_request_t *r)
goto
exit
;
}
if
(
cf
->
websocket_allow_publish
&&
(
ctx
->
frame
->
opcode
==
NGX_HTTP_PUSH_STREAM_WEBSOCKET_TEXT_OPCODE
))
{
if
(
ctx
->
frame
->
mask
)
{
for
(
i
=
0
;
i
<
ctx
->
frame
->
payload_len
;
i
++
)
{
ctx
->
frame
->
payload
[
i
]
=
ctx
->
frame
->
payload
[
i
]
^
ctx
->
frame
->
mask_key
[
i
%
4
];
}
if
(
ctx
->
frame
->
mask
)
{
for
(
i
=
0
;
i
<
ctx
->
frame
->
payload_len
;
i
++
)
{
ctx
->
frame
->
payload
[
i
]
=
ctx
->
frame
->
payload
[
i
]
^
ctx
->
frame
->
mask_key
[
i
%
4
];
}
}
if
(
!
ngx_http_push_stream_is_utf8
(
ctx
->
frame
->
payload
,
ctx
->
frame
->
payload_len
))
{
goto
finalize
;
}
if
(
!
ngx_http_push_stream_is_utf8
(
ctx
->
frame
->
payload
,
ctx
->
frame
->
payload_len
))
{
goto
finalize
;
}
if
(
cf
->
websocket_allow_publish
&&
(
ctx
->
frame
->
opcode
==
NGX_HTTP_PUSH_STREAM_WEBSOCKET_TEXT_OPCODE
))
{
for
(
q
=
ngx_queue_head
(
&
ctx
->
subscriber
->
subscriptions
);
q
!=
ngx_queue_sentinel
(
&
ctx
->
subscriber
->
subscriptions
);
q
=
ngx_queue_next
(
q
))
{
ngx_http_push_stream_subscription_t
*
subscription
=
ngx_queue_data
(
q
,
ngx_http_push_stream_subscription_t
,
queue
);
if
(
subscription
->
channel
->
for_events
)
{
...
...
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