简体   繁体   English

我怎么能保护我的paypal表格

[英]How could I protect my paypal form

I'm new to the paypal API, I read an article today that says : It's very simple for a bad guy to change the value of inputs in the paypal form (like the amount). 我是paypal API的新手,今天我读了一篇文章说:对于一个坏人来说改变paypal形式的输入值(比如金额)非常简单。

So instead of putting my code in the html markup, I decided to bring it via the ajax as the following : 因此,我没有将我的代码放在html标记中,而是决定通过ajax将其引入如下:

<div id="result"></div>


$.post({'action.php', {}, function(data)
{
   $('#result').html(data);

}, , 'html'); 

in my page action.php, I put this simple code : 在我的页面action.php中,我把这个简单的代码:

<?php
     echo '<input type="hidden" name="amount" value="99">';
?>

My question is : In this case, could bad folks change the value of this input ? 我的问题是:在这种情况下,坏人可以改变这个输入的值吗?

Thanks 谢谢

Yes, of course they could. 是的,他们当然可以。

Using the web developer tools that come with the browser, or with firebug, they can change values of hidden fields or of JavaScript values before the AJAX call. 使用浏览器附带的Web开发人员工具或使用firebug,他们可以在AJAX调用之前更改隐藏字段或JavaScript值的值。

You are adding a very thin layer of obfuscation that anyone with web development experience can easily get through. 您正在添加一个非常薄的混淆层,任何具有Web开发经验的人都可以轻松完成。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM