1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

ss: static policy generator: fix filepath detection

This commit is contained in:
Yichen Gu 2021-10-13 15:50:15 +01:00 committed by Andy Green
parent 61c2e3291f
commit 9b56baca8f
2 changed files with 4 additions and 1 deletions

View file

@ -1246,10 +1246,11 @@ lws_ss_policy_parse(struct lws_context *context, const uint8_t *buf, size_t len)
int m;
#if !defined(LWS_PLAT_FREERTOS) && !defined(LWS_PLAT_OPTEE)
if (args->jctx.line < 2 && buf[0] != '{')
if (args->jctx.line < 2 && buf[0] != '{' && !args->parse_data)
return lws_ss_policy_parse_file(context, (const char *)buf);
#endif
args->parse_data = 1;
m = lejp_parse(&args->jctx, buf, (int)len);
if (m == LEJP_CONTINUE || m >= 0)
return m;

View file

@ -401,6 +401,8 @@ struct policy_cb_args {
int count;
char pending_respmap;
uint8_t parse_data:1;
};
#if defined(LWS_WITH_SYS_SMD)