ssb: Filter out invalid RPC flags.
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 32m12s
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 32m12s
This commit is contained in:
@ -632,8 +632,10 @@ class TfMessageElement extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
allow_unread() {
|
allow_unread() {
|
||||||
return this.channel == '@' ||
|
return (
|
||||||
(!this.channel.startsWith('@') && !this.channel.startsWith('%'));
|
this.channel == '@' ||
|
||||||
|
(!this.channel.startsWith('@') && !this.channel.startsWith('%'))
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
render_unread_icon() {
|
render_unread_icon() {
|
||||||
|
@ -276,8 +276,10 @@ class TfTabNewsFeedElement extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
unread_allowed() {
|
unread_allowed() {
|
||||||
return this.hash == '#@' ||
|
return (
|
||||||
(!this.hash.startsWith('#%') && !this.hash.startsWith('#@'));
|
this.hash == '#@' ||
|
||||||
|
(!this.hash.startsWith('#%') && !this.hash.startsWith('#@'))
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
async load_more() {
|
async load_more() {
|
||||||
|
@ -1839,7 +1839,7 @@ static void _tf_ssb_connection_rpc_recv_push(tf_ssb_connection_t* connection, co
|
|||||||
|
|
||||||
while (connection->rpc_recv_size >= 9)
|
while (connection->rpc_recv_size >= 9)
|
||||||
{
|
{
|
||||||
uint8_t flags = *connection->rpc_recv_buffer;
|
uint8_t flags = (*connection->rpc_recv_buffer) & 0xf;
|
||||||
uint32_t body_len;
|
uint32_t body_len;
|
||||||
int32_t request_number;
|
int32_t request_number;
|
||||||
memcpy(&body_len, connection->rpc_recv_buffer + 1, sizeof(body_len));
|
memcpy(&body_len, connection->rpc_recv_buffer + 1, sizeof(body_len));
|
||||||
|
Reference in New Issue
Block a user