Best way to hide a form input field from being accessed using firebug?

后端 未结 2 965
星月不相逢
星月不相逢 2020-12-21 12:01

I have a form which is posted to an external API. There is a parameter called customer_token which is passed as an input field. It is used for authentication by the API and

2条回答
  •  感动是毒
    2020-12-21 12:01

    This is not possible. Firebug just reads the DOM in it's actual state, so even if it's added in a later stage, it can still be retrieved.

    This way of security is called Security through obscurity and is a kind of non-security. You would have to solve it another way, like letting the server do the request in stead.

    You let the user submit the form to the server. Then with curl, you make the call to the webservice with the correct user code.

提交回复
热议问题