mirror of
https://github.com/rkd77/elinks.git
synced 2024-09-30 03:26:23 -04:00
[gopher] XSS in gopher. Refs #125
add_to_string was replaced add_html_to_string.
This commit is contained in:
parent
70331f3f78
commit
558e7776ab
@ -382,7 +382,7 @@ add_gopher_description(struct string *buffer, enum gopher_entity entity)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
add_to_string(buffer, "<b>");
|
add_to_string(buffer, "<b>");
|
||||||
add_to_string(buffer, description);
|
add_html_to_string(buffer, description, strlen(description));
|
||||||
add_to_string(buffer, "</b> ");
|
add_to_string(buffer, "</b> ");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -502,7 +502,7 @@ add_gopher_menu_line(struct string *buffer, unsigned char *line)
|
|||||||
|
|
||||||
case GOPHER_INFO:
|
case GOPHER_INFO:
|
||||||
/* Information or separator line */
|
/* Information or separator line */
|
||||||
add_to_string(buffer, name);
|
add_html_to_string(buffer, name, strlen(name));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -515,7 +515,7 @@ add_gopher_menu_line(struct string *buffer, unsigned char *line)
|
|||||||
* was correctly parsed. */
|
* was correctly parsed. */
|
||||||
if (!port || !init_string(&address)) {
|
if (!port || !init_string(&address)) {
|
||||||
/* Parse error: Bad menu item */
|
/* Parse error: Bad menu item */
|
||||||
add_to_string(buffer, name);
|
add_html_to_string(buffer, name, strlen(name));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -552,7 +552,7 @@ add_gopher_menu_line(struct string *buffer, unsigned char *line)
|
|||||||
add_gopher_link(buffer, name, address.source);
|
add_gopher_link(buffer, name, address.source);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
add_to_string(buffer, name);
|
add_html_to_string(buffer, name, strlen(name));
|
||||||
}
|
}
|
||||||
|
|
||||||
done_string(&address);
|
done_string(&address);
|
||||||
|
Loading…
Reference in New Issue
Block a user