验证码:够了吗?(Captcha: is it enough?)

我正在实施重新验证码 。 我只是想知道是否必须花一些时间来实施CSRF,或者如果验证码消除了对CSRF保护的需求


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
2022-09-05 13:09

满意答案

在服务器端,侦听套接字仅与本地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 from accept and the socket descriptors returned from each can communicate with each other.

相关问答

更多

如何在jQuery .load()函数中传递Accept标头(How to pass Accept header in jQuery .load() function)

正如乔恩先前的回答中所提到的, load不能单独完成。 我更喜欢在ajax方法而不是beforeSend上使用headers选项: $.ajax({ url: "http//example.com", headers: { Accept: "application/whatever" // Use the actual type you need. }, success: function (data) { // Put the da...

socket API接受()函数如何工作?(How does the socket API accept() function work?)

您的困惑在于认为套接字由服务器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上打开连接并连接到服务器。 现在服务器有一个套接字标识如下: 1...

如何在jqueryui droppable中使用danymic accept值?(how to use danymic accept value in jqueryui droppable?)

您可以使用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 in...

函数只接受非常量左值(Having a function only accept non-const lvalues)

答案是:你的编译器是错误的。 检查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 sor...

函数重载接受所有类型的函数(Function overloads to accept all types of function)

像这样的东西: // Accepts a pointer to member function template <typename T, typename Ret, typename ParamA, typename... Params> unsigned int foo(Ret (T::*f)(ParamA, Params...)) { return sizeof...(Params); } // Accepts a pointer to const member function ...

PHP中的!is_numeric函数不接受NULL VALUE(The !is_numeric function in PHP does not accept NULL VALUE)

这可能是因为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...

accept()函数如何工作?(How does the accept() function work?)

在服务器端,侦听套接字仅与本地IP和端口关联,并处于LISTEN状态。 相反,服务器上接受的套接字(以及客户端上连接的套接字)由本地IP和端口以及远程IP和端口标识,并处于ESTABLISHED状态。 在客户端,服务器使用与连接的套接字分开的侦听套接字并不重要。 当客户端从connect返回时,服务器已经从accept并且从每个返回的套接字描述符可以相互通信。 On the server side, the listening socket is associated with only a lo...

jQuery接受的问题(issues with jQuery accept)

您的代码中存在拼写错误问题。 $("#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: fu...

多次使用alert.accept()无法正常运行(Using alert.accept() multiple times does not function properly)

我通过制作两个函数来检查不同的字段来解决它,但我不确定它为什么有效,我也不喜欢它,为什么在创建具有相同功能的函数时可以创建两个函数。 def checkTrapTransaction(): try: logUtb(f, 'Checking if Transaction type is trapped, making payment with Transaction type as empty') browser.find_by_id('submitBtn'...

套接字通信中accept函数返回的值(Value returned by accept function in socket communication)

accept调用返回一个文件描述符,用于新连接。 从接受的手册页: 成功时,这些系统调用返回一个非负整数,它是接受套接字的描述符。 出错时,返回-1,并正确设置errno accept永远不会返回1,因为它是用于标准输出的文件描述符(除非您以编程方式关闭此文件描述符!)。 至于第二个问题: 如果接受功能将分配编号2,那么在再次分配编号1的连接数之后? accept将使用进程表中第一个未使用的文件描述符。 因此,一旦相关的TCP连接关闭,就可以重用相同的“返回号码”(文件描述符)。 The acce...

相关文章

更多

微信验证码

相信大家对微信都已经耳熟能详了。因为微信已经渐渐的融入我们生活的个个细节,回想当初刚开始玩儿微信的时候 ...

请教怎么在CAS中添加验证码功能

公司项目要用到单点登录,根据linliangyi2007的CAS学习笔记初步掌握了CAS的使用,现在碰 ...

简单验证码生成——Java版

验证码大家都知道,它的作用也不用我多说了吧。如果不太清楚请参见百度百科中的解释,一般验证码的生成就是随 ...

jsp 验证码刷新无反应 怎么回事

我用的生成验证码为 authcode.jsp 在 login.jsp 中使用: &lt;form ...

请教通过手机验证码注册后台如何实现?

通过手机发送获取验证码,然后进行注册,验证码有60S的失效期,请问JAVA后台程序如何维护验证码,有没 ...

出轨了吗

明明白白我的心 寻找一份真感情 曾经为爱伤透了心 为什么甜密的梦容易醒 星光灿烂风儿凄 最是寂寞女儿心 ...

Hadoop即将过时了吗?

  Hadoop 这个单词如今铺天盖地,几乎成了大数据的代名词。仅仅数年时间,Hadoop 从边缘技术 ...

儿子,谈对象了吗?

1、媒人:二愣,这次见面,对女方印象怎么样? 二愣:好怕怕! 媒人:咋啦? 二愣:一见面,那女孩就冲我 ...

喂,上微信了吗?

摘要:在去年迎来巨大发展的微信用户量已超过6亿,成绩斐然。然而微信并不满足国内市场的成功,积极开拓海外 ...

javascript的验证

在做网页时、用javascript写了许多验证、 问题是假设客户端禁用了javascript 检查 ...

最新问答

更多

获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)

我用Google搜索了一个解决方案。 “EnumDisplayModeProvider”是我自己设置网站的各种模式的枚举。 public EnumDisplayModeProvider GetDisplayModeId() { foreach (var mode in DisplayModeProvider.Instance.Modes) if (mode.CanHandleContext(HttpContext)) {

如何通过引用返回对象?(How is returning an object by reference possible?)

这相对简单:在类的构造函数中,您可以分配内存,例如使用new 。 如果你制作一个对象的副本,你不是每次都分配新的内存,而是只复制指向原始内存块的指针,同时递增一个也存储在内存中的引用计数器,使得每个副本都是对象可以访问它。 如果引用计数降至零,则销毁对象将减少引用计数并仅释放分配的内存。 您只需要一个自定义复制构造函数和赋值运算符。 这基本上是共享指针的工作方式。 This is relatively easy: In the class' constructor, you allocate m

矩阵如何存储在内存中?(How are matrices stored in memory?)

正如它在“熵编码”中所说的那样,使用Z字形图案,与RLE一起使用,在许多情况下,RLE已经减小了尺寸。 但是,据我所知,DCT本身并没有给出稀疏矩阵。 但它通常会增强矩阵的熵。 这是compressen变得有损的点:输入矩阵用DCT传输,然后量化量化然后使用霍夫曼编码。 As it says in "Entropy coding" a zig-zag pattern is used, together with RLE which will already reduce size for man

每个请求的Java新会话?(Java New Session For Each Request?)

你是如何进行重定向的? 您是否事先调用了HttpServletResponse.encodeRedirectURL()? 在这里阅读javadoc 您可以使用它像response.sendRedirect(response.encodeRedirectURL(path)); The issue was with the path in the JSESSIONID cookie. I still can't figure out why it was being set to the tomca

css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)

我认为word-break ,如果你想在一个单词中打破行,你可以指定它,这样做可以解决问题: .column { word-break:break-all; } jsFiddle演示。 您可以在此处阅读有关word-break属性的更多信息。 I think word-break, with which you can specify if you want to break line within a word, will do the trick: .column { word-break

无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)

我认为您忘记在分类时间内缩放输入图像,如train_test.prototxt文件的第11行所示。 您可能应该在C ++代码中的某个位置乘以该因子,或者使用Caffe图层来缩放输入(请查看ELTWISE或POWER图层)。 编辑: 在评论中进行了一次对话之后,结果发现在classification.cpp文件中错误地删除了图像均值,而在原始训练/测试管道中没有减去图像均值。 I think you have forgotten to scale the input image during cl

xcode语法颜色编码解释?(xcode syntax color coding explained?)

转到: Xcode => Preferences => Fonts & Colors 您将看到每个语法高亮颜色旁边都有一个简短的解释。 Go to: Xcode => Preferences => Fonts & Colors You'll see that each syntax highlighting colour has a brief explanation next to it.

在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)

你考虑过第三方拼写检查吗? 您可以将在C#中开发的自定义WinForms控件插入访问数据库吗? VB6控件怎么样? 如果你能找到一个使用第三方库进行拼写检查的控件,那可能会有效。 Have you considered a third party spell checker? Can you insert a custom WinForms controls developed in C# into an access database? What about a VB6 control? If

从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)

我有同样的问题,因为我在远程服务器上有两个图像,我需要在每天的预定义时间复制到我的本地服务器,这是我能够提出的代码... try { if(@copy('url/to/source/image.ext', 'local/absolute/path/on/server/' . date("d-m-Y") . ".gif")) { } else { $errors = error_get_last(); throw new Exception($err

从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))

我不确定我完全明白你在说什么。 你能编辑你的帖子并包含你正在做的Subversion命令/操作的特定顺序吗? 最好使用命令行svn客户端,以便容易为其他人重现问题。 如果您只是想获取文件的旧副本(即使该文件不再存在),您可以使用如下命令: svn copy ${repo}/trunk/moduleA/file1@${rev} ${repo}/trunk/moduleB/file1 其中${repo}是您的存储库的URL, ${rev}是您想要的文件的版本。 这将恢复该文件的旧版本,包括最高版本