Skip Menu |

This queue is for tickets about the POE-Component-Client-Ident CPAN distribution.

Report information
The Basics
Id: 8282
Status: resolved
Worked: 30 min
Priority: 0/
Queue: POE-Component-Client-Ident

People
Owner: BINGOS [...] cpan.org
Requestors: rtperlpoeclient [...] pRiV.de
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.1
Fixed in: (no value)



Subject: POE::Component::Client::Ident doesn´t tolerant identd answers with just \n as line seperator
Hi POE Inetd Developer, I´ve found a weakness in POE::Component::Client::Ident and accordingly POE/Component/Client/Ident/Agent.pm: It doesn´t support identd answers with just "\n" as line sperator. Only "\r\n" is supported. Example: 00000000 33 34 30 34 2c 20 35 38 31 32 31 0d 0a 3404, 58 121.. 00000000 33 34 30 34 2c 20 35 38 31 32 31 20 3a 20 55 53 3404, 58 121 : US 00000010 45 52 49 44 20 3a 20 55 4e 49 58 20 3a 20 76 61 ERID : U NIX : va 00000020 63 6f 0a co. Thats not tolerant enough. The fix is easy: Remove in Line 79 the paramter 'Literal => "\x0D\x0A"', and the fallback is active ( \n\r or \r\n or \r or \n). See documentation of POE::Filter::Line at http://search.cpan.org/~rcaputo/POE-0.29/lib/POE/Filter/Line.pm : [...] Incoming newlines are recognized with a simple regular expression by default: |/(\x0D\x0A?|\x0A\x0D?)/|. This regexp encompasses all the variations of CR and/or LF, but it has a race condition. [...] Regards, Markus Mueller
Added option to spawn method of Ident-Agent to specify whether to use default behaviour of POE::Filter::Line for matching EOL literals. Specifying BuggyIdentd => 1 will activate this behaviour. To pass the applicable option from poco-client-ident to the ident- agent, use the above option when sending the 'query' event to the Ident session. POE::Component::Client::Ident::Agent->spawn( PeerAddr => "192.168.1.12" # Originating IP Address PeerPort => 12345 # Originating port SockAddr => "192.168.2.24" # Local IP address SockPort => 69 # Local Port Socket => $socket_handle # Or pass in a socket handle IdentPort => 113 # Port to send queries to on originator # Default shown BuggyIdentd => 0 # Dealing with an Identd that isn't # RFC compatable. Default is 0. ); $kernel->post ( 'Ident-Client' => query => PeerAddr => '10.0.0.1', PeerPort => 2345, SockAddr => '192.168.1.254', SockPort => 6669, BuggyIdentd => 1 ); Cheers, Chris 'BinGOs' Williams