dominikh changed the topic of #cinch to: The IRC Framework | Latest version: Cinch 2.0.5
jonahR has quit [Quit: jonahR]
v0n has joined #cinch
v0n has quit [Ping timeout: 252 seconds]
sleetdrop has joined #cinch
rickmasta has joined #cinch
Spaceghost has quit [Read error: Connection reset by peer]
Spaceghost has joined #cinch
Spaceghost is now known as Guest60889
rickmasta has quit [Quit: Leaving...]
sacc91 has quit [Remote host closed the connection]
rickmasta has joined #cinch
sleetdrop has quit [Quit: Computer has gone to sleep.]
rickmasta has quit [Quit: Leaving...]
Spami has joined #cinch
sleetdrop has joined #cinch
Guest60889 is now known as Spaceghost
Spaceghost has quit [Changing host]
Spaceghost has joined #cinch
Spaceghost has quit [Ping timeout: 246 seconds]
Spaceghost has joined #cinch
Spaceghost is now known as Guest72964
rickmasta has joined #cinch
Guest72964 is now known as Spaceghost
Spaceghost has quit [Changing host]
Spaceghost has joined #cinch
rickmasta has quit [Quit: Leaving...]
rikai has quit [Ping timeout: 240 seconds]
rikai has joined #cinch
Spami has quit [Quit: This computer has gone to sleep]
Spami has joined #cinch
Spami has joined #cinch
Spami has quit [Changing host]
<ayonix> I've got a problem: i have this plugin to fetch a title of a posted url: https://github.com/ayonix/cinch-plugins/blob/master/lib/cinch/plugins/title.rb
<ayonix> after that the bot wouldn't reply to pings of the network
space__ has joined #cinch
Spaceghost has quit [Ping timeout: 256 seconds]
postmodern has quit [Quit: Leaving]
<ayonix> it was reproducible within cinch, doing the same in irb works without problems. is it just my regex that is wrong? but why does it break cinch then? :S
<ayonix> oh..my regex doesn't terminate in that case..nevermind
sleetdrop has quit [Ping timeout: 246 seconds]
jonahR has joined #cinch
jmnoz has joined #cinch
space__ has quit [Remote host closed the connection]
v0n has joined #cinch
dominikh has quit [Remote host closed the connection]
dominikh has joined #cinch
sleetdrop has joined #cinch
<dominikh> ayonix: how could it not terminate?
sleetdrop has quit [Quit: Textual IRC Client: www.textualapp.com]
jonahR has quit [Quit: jonahR]
jonahR has joined #cinch
<ayonix> i dont know, but it is like that
<ayonix> oh..or it just took too long (>7 minutes)
<dominikh> unless it was a specifically crafted message to trigger http://en.wikipedia.org/wiki/ReDoS I'm really curious how you managed to do that.
<Cinchy> [URL] ReDoS - Wikipedia, the free encyclopedia
<dominikh> (also requires certain regexps)
<ayonix> yeah i was just too impatient, it really does terminate, on the raspberry pie though it needed more than 7 minutes
<dominikh> yeah it shouldn't need 7 minuets, either.
<dominikh> it shouldn't need a second.
<ayonix> try it yourself :D
<dominikh> that's beyond impressive.
<waxjar_> damn. lol
<ayonix> i needed a pretty long time to come up with that regex to come close to my wantings
<ayonix> and then its slow as hell
<ayonix> :/
<waxjar_> use URI.extract from the std lib :D
<dominikh> I can't even begin to understand why that particular regexp and input behave so terribly
<dominikh> oh
<ayonix> waxjar_: i'll think about it :D
<ayonix> found anything?
<dominikh> probably runs into the issue that I linked to above
<ayonix> yep, the first part seems bad
<dominikh> it's the combination of both, really
<ayonix> hmm yeah
<waxjar_> it spikes up to ~90% CPU on my machine immediately
<ayonix> i don't even know anymore why i didn't use something like /^[^!]/ as prefix and just throw everything into a method to check for an url
<ayonix> hmm but why exactly is that url evil? other strings seem to be fine
<dominikh> probably the length combined with the dashes (word boundaries)
<dominikh> ayonix: for that given input, it requires more than 100_000 steps to check
<ayonix> "nice"
<ayonix> amazon urls seem to be pretty awkward for that regex too
<dominikh> http://stuff.fork-bomb.org/2013-06-26_19h-00m-13s.png notice the lovely scrollbar
<ayonix> awesome
<dominikh> so yeah, don't use that regexp :)
<ayonix> yup, switching from word boundaries to \s is better..
<dominikh> fyi, [^\s] is just \S
<ayonix> hehe, thanks
<ayonix> although..a prefix like /^[^!]/ is possible as well, isn't it?
<dominikh> why wouldn't it
<ayonix> hmm right, my problem with that was that i was trying to match any words before the url.. i'll just use that + URI.extract.. :)
<dominikh> yeah you should
<dominikh> that's enough debugging catastrophic regexps and installing shareware in VMs for me, I'll be gone
<ayonix> wow..one url still hasn't finished yet.
<ayonix> thanks again, see you
Spami has quit [Quit: This computer has gone to sleep]
<ayonix> hmm i remember why i didn't go with the prefix /^[^!]/ approach. if anyone just sent an url then it would only pass 'ttp://..' to the method. prepending an h is still less pain than getting the right regex though..
<dominikh> uhm, I think you're doing it wrong.
<ayonix> i don't want to exclude that option :P
<ayonix> basically i want to extract urls from messages that dont start with an exclamation mark
<dominikh> so? check that the first character isn't an !, and when it isn't, run URL.extract on the message
<dominikh> there's no need for regexps at all
<ayonix> -.- true
<ayonix> thanks
<ayonix> totally forgot about m.message
rickmasta has joined #cinch
<nickrw> is it possible to specify a channel with a key with cinchize's yaml?
<dominikh> probably the same way you do in cinch. channel name and key in one string, separated with a space.
<nickrw> ah, wasn't aware of that, thanks
<dominikh> Netfeed would know more.
<nickrw> yes, that works - thanks :)
<Netfeed> yeah, i don't do anything fancy with the channels
v0n has quit [Ping timeout: 246 seconds]
v0n has joined #cinch
rickmasta has quit [Quit: Leaving...]
jmnoz has quit [Ping timeout: 256 seconds]
rickmasta has joined #cinch
txdv_ has quit [Ping timeout: 264 seconds]
txdv has joined #cinch
Spaceghost has joined #cinch
Spaceghost is now known as Guest12786
postmodern has joined #cinch
waxjar_ has quit [Ping timeout: 260 seconds]
Guest12786 is now known as Spaceghost
Spaceghost has quit [Changing host]
Spaceghost has joined #cinch
rickmasta has quit [Quit: Leaving...]
v0n has quit [Ping timeout: 256 seconds]
Spaceghost has quit [Read error: Connection reset by peer]
Spami has joined #cinch
Spami has quit [Quit: This computer has gone to sleep]
Spami has joined #cinch
Spami has joined #cinch
Spami has quit [Quit: This computer has gone to sleep]
waxjar has joined #cinch