Skip to content

Commit

Permalink
hardening
Browse files Browse the repository at this point in the history
  • Loading branch information
MightyPork committed Aug 6, 2017
1 parent 3200232 commit 61b5a25
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/httpdespfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,10 @@ typedef struct {
int ICACHE_FLASH_ATTR
tplSend(HttpdConnData *conn, const char *str, int len)
{
if (conn == NULL) return 0;
TplData *tpd=conn->cgiData;

if (tpd->tokEncode == ENCODE_PLAIN) return httpdSend(conn, str, len);
if (tpd == NULL || tpd->tokEncode == ENCODE_PLAIN) return httpdSend(conn, str, len);
if (tpd->tokEncode == ENCODE_HTML) return httpdSend_html(conn, str, len);
if (tpd->tokEncode == ENCODE_JS) return httpdSend_js(conn, str, len);
return 0;
Expand Down

0 comments on commit 61b5a25

Please sign in to comment.