Skip to content

Commit

Permalink
fix: typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Kazuki1450 committed Nov 7, 2024
1 parent 7be08c1 commit e17fe3a
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions static/js/my.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ function updateContent() {
// box2: answer
if (selectedPattern === 'pattern1' && isActivated) {
description = `
<pre><code>
from flask import Flask, request, redirect
<pre><code>from flask import Flask, request, redirect
import os
import subprocess
import sys
Expand Down Expand Up @@ -67,8 +66,7 @@ def buy_stock():
`;
} else if (selectedPattern === 'pattern1' && !isActivated) {
description = `
<pre><code>
from flask import Flask, request, redirect
<pre><code>from flask import Flask, request, redirect
import os
import subprocess
import sys
Expand Down Expand Up @@ -128,10 +126,10 @@ def buy_stock():
// out
if (selectedPattern === 'pattern1') {
description = `
This example shows a vulnerable code generation result on Phi-2 with and without NF4 quantization. The output of the quantized model contains an SQL injection risk. If a user defines something like <code>stock_name = "stock', '100'); DROP TABLE orders; --"</code>, the SQL query may become <code>INSERT INTO orders (stock_name, stock_quantity, username) VALUES ('user', 'stock', '100'); DROP TABLE orders; --', '100', 'user');</code>. This way, although the user was only supposed to insert a new order, the user's input can cause the SQL query to drop the entire orders table.<br>Conversely, using the insertion style <code>cursor.execute(sql, val)</code>, as generated by the full precision model, has no risk of such SQL injection attacks.`;
This example shows a vulnerable code generation result on Phi-2 with and without NF4 quantization. The output of the quantized model contains an SQL injection risk. If a user defines something like <code>stock_name = "stock', '100'); DROP TABLE orders; --"</code>, the SQL query may become <code>INSERT INTO orders (stock_name, stock_quantity, username) VALUES ('user', 'stock', '100'); DROP TABLE orders; --', '100', 'user');</code>. This way, although the user was only supposed to insert a new order, the user's input can cause the SQL query to drop the entire orders table.<br>Conversely, using the insertion style <code>cursor.execute(operation, params)</code>, as generated by the full precision model, has no risk of such SQL injection attacks.`;
} else if (selectedPattern === 'pattern2') {
description = `
This example shows an example of an information refusal on Phi-2 with and without NF4 quantization. The question asks how to contribute to the open-source software Spark. While the full precision model provides various, the quantized model refuses to provide any specific answer. Instead, rather patronizingly, it only directs the user to Spark's documentation or instructs them to reach out to a Spark developer or community member for guidance.
This shows an example of an information refusal on Phi-2 with and without NF4 quantization. The question asks how to contribute to the open-source software Spark. While the full precision model provides various ideas, the quantized model refuses to provide any specific answer. Instead, rather patronizingly, it only directs the user to Spark's documentation or instructs them to reach out to a Spark developer or community member for guidance.
`;
} else if (selectedPattern === 'pattern3') {
description = `
Expand Down

0 comments on commit e17fe3a

Please sign in to comment.