Is either GET or POST more secure than the other?

前端 未结 27 2693
没有蜡笔的小新
没有蜡笔的小新 2020-11-22 05:13

When comparing an HTTP GET to an HTTP POST, what are the differences from a security perspective? Is one of the choices inherently more secure than the other? If so, why?

27条回答
  •  忘掉有多难
    2020-11-22 05:56

    Even POST accepts GET requests. Assume you have a form having inputs like user.name and user.passwd, those are supposed to support user name and password. If we simply add a ?user.name="my user&user.passwd="my password", then request will be accepted by "bypassing the logon page".

    A solution for this is to implement filters (java filters as an e) on server side and detect no string queries are passed as GET arguments.

提交回复
热议问题