0

FirefoxまたはChromeのデバッガーを介してjavascript関数を変更する手順を知っている人はいますか? 深刻なセキュリティ上の懸念はありますか?

4

1 に答える 1

0

The steps to change JS function using chrome devtools are as follow:

  1. Open chrome dev tools (you can use right-click and then choose inspect element).
  2. Open the 'Source' tab.
  3. Choose the javascript file that contain the function you wish to change.
  4. Edit the code.
  5. Click on 'ctrl-s' to save it.
  6. You are done. If this code is being called from an event on the page (e.g. click on a button) you will be able to see your changes without any reload.

As for security concerns, you should always validate the user input on the server side. On the client you should 'guide' the user to enter the right data but never trust it. There are many cases where someone will be able to change the data 'on the fly' (=man in the middle) so you should never trust the client.

于 2013-01-25T10:16:56.387 に答える