mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-10 08:38:28 +00:00
Fixed potential XSS problem with pastes display in 'search' and 'important_paste_by_module'.
This commit is contained in:
parent
047331df3e
commit
1766ced9e6
2 changed files with 4 additions and 2 deletions
|
@ -92,7 +92,8 @@ $(document).ready(function(){
|
||||||
}
|
}
|
||||||
|
|
||||||
if (final_index != start_index){ // still have data to display
|
if (final_index != start_index){ // still have data to display
|
||||||
$("#mymodalbody").find("#paste-holder").text($("#mymodalbody").find("#paste-holder").text()+complete_paste.substring(start_index+1, final_index+1)); // Append the new content
|
// Append the new content using text() and not append (XSS)
|
||||||
|
$("#mymodalbody").find("#paste-holder").text($("#mymodalbody").find("#paste-holder").text()+complete_paste.substring(start_index+1, final_index+1));
|
||||||
start_index = final_index;
|
start_index = final_index;
|
||||||
if (flag_stop)
|
if (flag_stop)
|
||||||
nothing_to_display();
|
nothing_to_display();
|
||||||
|
|
|
@ -196,7 +196,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (final_index != start_index){ // still have data to display
|
if (final_index != start_index){ // still have data to display
|
||||||
$("#mymodalbody").find("#paste-holder").append(complete_paste.substring(start_index+1, final_index+1)); // Append the new content
|
// Append the new content using text() and not append (XSS)
|
||||||
|
$("#mymodalbody").find("#paste-holder").text($("#mymodalbody").find("#paste-holder").text() + complete_paste.substring(start_index+1, final_index+1));
|
||||||
start_index = final_index;
|
start_index = final_index;
|
||||||
if (flag_stop)
|
if (flag_stop)
|
||||||
nothing_to_display();
|
nothing_to_display();
|
||||||
|
|
Loading…
Reference in a new issue