验证码:够了吗?(Captcha: is it enough?)
I'm implementing re-captcha. And I'm just wondering if I have to spend some time implementing CSRF or if a captcha eliminates the need for the CSRF protection?
原文:https://stackoverflow.com/questions/21797989
最满意答案
在服务器端,侦听套接字仅与本地IP和端口关联,并处于LISTEN状态。
相反,服务器上接受的套接字(以及客户端上连接的套接字)由本地IP和端口以及远程IP和端口标识,并处于ESTABLISHED状态。
在客户端,服务器使用与连接的套接字分开的侦听套接字并不重要。 当客户端从
connect
返回时,服务器已经从accept
并且从每个返回的套接字描述符可以相互通信。On the server side, the listening socket is associated with only a local IP and port and is in the LISTEN state.
In contrast, accepted sockets on the server (as well as connected sockets on the client) are identified by a local IP and port as well as a remote IP and port and is in the ESTABLISHED state.
On the client side, it doesn't matter that the server uses a listening socket separate from the connected socket. By the time the client returns from
connect
, the server has returned fromaccept
and the socket descriptors returned from each can communicate with each other.
相关问答
更多-
正如乔恩先前的回答中所提到的, load不能单独完成。 我更喜欢在ajax方法而不是beforeSend上使用headers选项: $.ajax({ url: "http//example.com", headers: { Accept: "application/whatever" // Use the actual type you need. }, success: function (data) { // Put the data in ...
-
您的困惑在于认为套接字由服务器IP:服务器端口标识。 实际上,插座由四方信息唯一标识: Client IP : Client Port和Server IP : Server Port 所以当服务器IP和服务器端口在所有接受的连接中是不变的,客户端信息是什么允许它跟踪所有事情的发生。 澄清事情的例子: 假设我们有一个服务器在192.168.1.1:80和两个客户端,10.0.0.1和10.0.0.2。 10.0.0.1在本地端口1234上打开连接并连接到服务器。 现在服务器有一个套接字标识如下: 10.0.0 ...
-
如何在jqueryui droppable中使用danymic accept值?(how to use danymic accept value in jqueryui droppable?)[2023-11-10]
您可以使用droppable()作为函数进行accept ,并在里面指定您的条件: accept: function(e){ if(e.hasClass($(this).attr('title'))) return true; } 或更短: accept: function(e){ return e.hasClass($(this).attr('title')); } 谢谢。 You can make accept in droppable() as a function instead ... -
答案是:你的编译器是错误的。 检查gcc或clang或类似的,你会得到这样的东西: prog.cpp:在函数'int main()'中:prog.cpp:9:45:错误:从'std :: vector'类型的右值类型'std :: vector&'的非const引用无效初始化(矢量{2,1,3},矢量{3,1,2}); ^ prog.cpp:6:6:注意:初始化'void sort(A&,B&)[with A = std :: vector; B = std :: vector]'void sort(A&X ...
-
像这样的东西: // Accepts a pointer to member function template
unsigned int foo(Ret (T::*f)(ParamA, Params...)) { return sizeof...(Params); } // Accepts a pointer to const member function templ ... -
PHP中的!is_numeric函数不接受NULL VALUE(The !is_numeric function in PHP does not accept NULL VALUE)[2022-10-08]
这可能是因为null 不是数值。 它是无效的; 它什么都没有,它肯定不等于整数0.如果你想检查一个数值,或者为null,那么这正是你应该做的: if( $yourvalue !== null && !is_numeric( $yourvalue ) ) { } That's probably because null isn't a numeric value. It's void; it's nothing, and it certainly doesn't equal the integer 0. I ... -
在服务器端,侦听套接字仅与本地IP和端口关联,并处于LISTEN状态。 相反,服务器上接受的套接字(以及客户端上连接的套接字)由本地IP和端口以及远程IP和端口标识,并处于ESTABLISHED状态。 在客户端,服务器使用与连接的套接字分开的侦听套接字并不重要。 当客户端从connect返回时,服务器已经从accept并且从每个返回的套接字描述符可以相互通信。 On the server side, the listening socket is associated with only a local I ...
-
jQuery接受的问题(issues with jQuery accept)[2023-08-15]
您的代码中存在拼写错误问题。 $("#target").droppable({ accept: "#Proof"; // <-- replace ';' by ',' drop: function (event, ui) {...} }); There is a typo issue in your code. $("#target").droppable({ accept: "#Proof"; // <-- replace ';' by ',' drop: functio ... -
多次使用alert.accept()无法正常运行(Using alert.accept() multiple times does not function properly)[2022-03-05]
我通过制作两个函数来检查不同的字段来解决它,但我不确定它为什么有效,我也不喜欢它,为什么在创建具有相同功能的函数时可以创建两个函数。 def checkTrapTransaction(): try: logUtb(f, 'Checking if Transaction type is trapped, making payment with Transaction type as empty') browser.find_by_id('submitBtn').fir ... -
accept调用返回一个文件描述符,用于新连接。 从接受的手册页: 成功时,这些系统调用返回一个非负整数,它是接受套接字的描述符。 出错时,返回-1,并正确设置errno accept永远不会返回1,因为它是用于标准输出的文件描述符(除非您以编程方式关闭此文件描述符!)。 至于第二个问题: 如果接受功能将分配编号2,那么在再次分配编号1的连接数之后? accept将使用进程表中第一个未使用的文件描述符。 因此,一旦相关的TCP连接关闭,就可以重用相同的“返回号码”(文件描述符)。 The accept ca ...