Долгое время просмотра, первый раз публикации. Я новичок в php и надеюсь, что кто-то может помочь. У меня проблема с совместимостью с pci с помощью контактной формы с этого веб-сайта, Форма учебного пособия для оленя Php Ajax Jquery . Я хотел бы знать, что мне нужно сделать, чтобы быть совместимым, я запустил код с контрольным сканированием, и вот что было возвращено:
Summary:
Cross-Site Scripting
Risk: High (3)
Type: Fritko
Port: 80
Protocol: TCP
Threat ID: 300004
Information From Target:
Regular expression ".{0,1}'.{0,1}">" matched contents of /contactform.php/'">.
Query Parameters
Fritko - '">
Solution:
There are built in functions for different languages that may do the encoding for you. In PHP you can use the htmlspecialchars() function In .Net you can use the Server.HtmlEncode() function.Details:
XSS is a type of computer security vulnerability typically found
in web applications which allow code injection by malicious web
users into the web pages viewed by other users. Examples of such
code include HTML code and client-side scripts.
An attacker can use this vulnerability to completely alter the
layout of a particular page for a specific user or to force the
user to launch malicious javascript.
Cross site scripting occurs when user input is not properly
encoded by the application prior to display back to the user. In
order to fix this issue, the application developers must encode
most non-alphanumeric user-supplied data into their corresponding
HTML characters before the data is displayed back to the user. For
example, " would convert to " and < would convert
to <
There are built in functions for different languages that may do
the encoding for you. In PHP you can use the htmlspecialchars()
function In .Net you can use the Server.HtmlEncode() function.
Пока я много гуглял, я заблудился в том, что мне нужно добавить, чтобы исправить проблему. Код с сайта именно то, что я использовал. Ребята, можете ли вы помочь мне в этом? Если вы зайдете на веб-сайт, вы сможете проверить полный код и помочь мне, я буду очень признателен!