--- Log opened Thu Feb 19 00:00:02 2015 |
00:13 | | Turaiel is now known as Turaiel[Offline] |
00:41 | | Derakon[AFK] is now known as Derakon |
00:42 | | Thalass is now known as Thalass|TF2 |
01:46 | | Red_Queen [Z@Nightstar-484uip.cust.comxnet.dk] has joined #code |
01:46 | | mode/#code [+o Red_Queen] by ChanServ |
01:48 | | Reiv [NSwebIRC@Nightstar-q8avec.kinect.net.nz] has quit [Ping timeout: 121 seconds] |
01:48 | | Checkmate [Z@Nightstar-484uip.cust.comxnet.dk] has quit [Ping timeout: 121 seconds] |
01:48 | | Reiv [NSwebIRC@Nightstar-q8avec.kinect.net.nz] has joined #code |
01:48 | | mode/#code [+o Reiv] by ChanServ |
01:57 | | Red_Queen [Z@Nightstar-484uip.cust.comxnet.dk] has quit [Ping timeout: 121 seconds] |
02:40 | | Thalass|TF2 is now known as Thalass |
04:21 | | Vash [Vash@Nightstar-uhn82m.ct.comcast.net] has quit [[NS] Quit: Quit] |
04:27 | | Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving] |
04:56 | | Thalass is now known as Thalasleep |
05:12 | | Derakon is now known as Derakon[AFK] |
05:13 | | Turaiel[Offline] is now known as Turaiel |
05:50 | | Kindamoody[zZz] is now known as Kindamoody |
05:57 | | Turaiel is now known as Turaiel[Offline] |
06:49 | | celticminstrel [celticminst@Nightstar-j5b.hci.93.65.IP] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!] |
07:04 | < AnnoDomini> | Will this regex adequately validate email addresses? /^.+@.+\..+$/ |
08:41 | <@himi> | Depends what you want to validate it for |
08:44 | <@himi> | For a start, email addresses shouldn't have spaces in them |
08:46 | <@himi> | If you know you have reasonably clean input data, or you've already pulled all the white space separated tokens out, that'll do as a quick way to pull out the user and domain parts, but it'll give you false negatives otherwise |
08:51 | <@himi> | Depending on the context, you might also want to allow an email address with a single-element domain name - 'root@localhost' is a perfectly valid email address, unless you want to spam someone ;-P |
08:52 | <@himi> | Both the user and domain name parts are explicitly restricted in the characters they can support, though that's a lot more complicated these days thanks to unicode domain names |
08:53 | <@himi> | The gist of it is that this isn't something that can be answered without a whole lot more context |
09:31 | < AnnoDomini> | OK. |
09:33 | < froztbyte> | AnnoDomini: a bit short of what you need; http://www.ex-parrot.com/pdw/Mail-RFC822-Address.html |
09:34 | < AnnoDomini> | Yeah, I saw that. |
09:35 | < froztbyte> | it really isn't even a troll |
09:37 | < AnnoDomini> | It's also fairly useless for my use case. I've asked my coworkers now, and the suggestion was independently pretty much the regex I pasted. |
09:40 | | * TheWatcher eyes |
09:44 | <@TheWatcher> | AnnoDomini: except that the regex you pasted is essentially worthless for determining whether an email address is well formed (no regex can dtermine whether an address is /valid/ - that's a w whole different kettle of fish) |
09:45 | < AnnoDomini> | I want to guarantee that javax.mail.Transport will not throw up an exception when fed a validated email address. |
09:46 | <@TheWatcher> | You may as well just check whether the string contains an @ for all the actual validation that regex is doing - the godsawful mess on the ex-parrot page froztbyte linked is /just about/ able to determine whether an address is well-formed |
09:46 | <@TheWatcher> | (it's also wrong) |
09:47 | <@TheWatcher> | (because anything you do to try and test the validity of an email address is wrong. But that's just because email hates the living, and anything that anyone does with it is wrong) |
09:47 | < froztbyte> | yup yup |
09:48 | < froztbyte> | AnnoDomini: tldr is that you're doing it wrong |
09:48 | < AnnoDomini> | I'm sure. |
09:48 | < froztbyte> | how you validate an email address is "see if the end server accepts it" |
09:48 | < froztbyte> | literally everything else is fucked |
09:48 | <@himi> | I think you mean, email wants the living to /love/ it, but it's utterly incapable of figuring out how because it's fundamentally insane |
09:48 | < froztbyte> | why do you need to (try) validate an email address? |
09:49 | < AnnoDomini> | I don't actually really care about the end server. So long as a) the user is allowed to put it in, b) javax.mail.Transport happily sends it along, I'm happy. |
09:52 | <@himi> | Then check the library doco and see what it expects |
09:52 | <@himi> | But expect it to talk about RFC822 |
09:54 | < AnnoDomini> | Right. |
09:55 | <@TheWatcher> | (And probably also 6531, 5322, 5321, 3696, and others...) |
09:56 | <@himi> | Also, there are probably libraries or whatever in the language of your choice that can do this for you |
09:57 | < AnnoDomini> | Found my problem. |
09:57 | <@TheWatcher> | EMail~ |
09:58 | < AnnoDomini> | I was using InternetAddress on a string to get me email addresses. It does SOME validation, but not a lot. |
09:58 | < AnnoDomini> | To actually validate it, you need to .validate(). |
10:21 | | * TheWatcher ponders web stats for systems in work |
10:22 | <@TheWatcher> | 30% chrome, 20% firefox, 19% unknown, 12% IE. How things have changed... |
10:38 | <@gnolam> | AnnoDomini: https://www.youtube.com/watch?v=JENdgiAPD6c should be required viewing for anyone trying to do email validation. |
10:38 | <@Alek> | wait wait |
10:39 | <@Alek> | that only adds up to 81%. |
10:39 | <@Alek> | what's the other 19%? |
10:39 | <@Alek> | and that's assuming there's no overlap. |
10:46 | < AnnoDomini> | gnolam: I saw that. Twice. |
10:46 | | Kindamoody is now known as Kindamoody|afk |
10:49 | | Checkmate [Z@Nightstar-484uip.cust.comxnet.dk] has joined #code |
10:49 | | mode/#code [+o Checkmate] by ChanServ |
11:08 | | Checkmate is now known as Her |
11:10 | | AnnoDomini is now known as Jekal |
11:14 | < [R]> | <himi> For a start, email addresses shouldn't have spaces in them <-- I have one that does. |
11:15 | < [R]> | User part can also contain an @ |
11:21 | <@Alek> | o_o |
11:22 | <@Tarinaky> | Email addresses don't work how you think they ought to work |
11:22 | <@Tarinaky> | +TL;DR |
11:22 | <@Alek> | I've seen periods and underscores, never even HEARD of spaces or schwa before. |
11:22 | <@Alek> | and only rumors of case-sensitive email addresses. |
11:23 | <@Alek> | although I do recall case-sensitive website URLs. vaguely. |
11:24 | <@Tarinaky> | And then there's unicode. And then there're assorted standards on banning unicode based on context to reduce fishing i.e. if you're using more than 2 different languages at once you're probably up to no good. |
11:38 | <@himi> | [R]: without going back to checking the RFCs, I could have sworn that 822 disallowed spaces in the whole thing |
11:39 | <@himi> | Maybe it's been loosened up with more recent versions and the whole unicode thing |
11:39 | <@himi> | It /used/ to be possible to specify the actual route that mail would go (at least, in theory - you were free to ignore it if you were implementing an MTA) using a string of @domains in the address |
11:41 | <@himi> | But bed is beckoning more strongly than being Right(tm) about something . . . |
11:53 | <@Tarinaky> | himi: I thought the '!' character specified that? |
12:09 | < froztbyte> | <Tarinaky> And then there's unicode. And then there're assorted standards on banning unicode based on context to reduce fishing i.e. if you're using more than 2 different languages at once you're probably up to no good. |
12:09 | < froztbyte> | I'm very very glad that's not a common practiec |
12:09 | < froztbyte> | it'd make my life hell |
12:18 | < froztbyte> | practice* |
12:19 | | Jekal is now known as AnnoDomini |
12:41 | <@Tarinaky> | froztbyte: In the domain name? |
12:41 | < froztbyte> | yes |
12:42 | <@Tarinaky> | It special cases that it's quite common for Japanese to mix up three different alphabets but why would you want to mix say... Irish and Cyrillics? |
12:42 | <@Tarinaky> | With English |
12:42 | < froztbyte> | arabic and english is something I see quite extensively (in legit use) |
12:42 | <@Tarinaky> | That's 2. |
12:42 | < froztbyte> | same with some portuguese added in |
12:43 | < froztbyte> | swedish |
12:43 | < froztbyte> | etc |
12:43 | < froztbyte> | I've even had english + swedish + arabic |
12:43 | <@Tarinaky> | That's still 2 and English. |
12:43 | < froztbyte> | but it's still more than enough to take a dump all over that "probably" |
12:46 | <@Tarinaky> | Yes, well. Coming up with technical solutions to stop CRIME (all of it) is hard. |
12:47 | <@Tarinaky> | But for the time being it's probably wise for anyone in charge of online branding to avoid mixing up more alphabets than is absolutely necessary. |
12:51 | < froztbyte> | yeah I really don't agree with that |
12:52 | < froztbyte> | struggling to articulate why, though |
12:52 | < AnnoDomini> | Don't be such a language-racist, Tarinaky. :P |
12:53 | < froztbyte> | the best I can come up with is that it feels like the same kind of approach as "it's just a string" is in C/unicode-haters scenarios |
12:57 | <@Tarinaky> | If you're an exclusive anglophone the solution's easy. Just disable unicode support in your client software so any rogue characters appear brazenly as big boxes of numbers. |
12:57 | <@Tarinaky> | But this is a step backwards. |
12:58 | <@Tarinaky> | Also has unintended side effects like Polish postal workers being able to decode a sequence of unicode code points written on a label into an address. |
12:59 | <@Tarinaky> | Or whichever country that picture was from. |
13:06 | <@gnolam> | <Tarinaky> And then there's unicode. And then there're assorted standards on banning unicode based on context to reduce fishing i.e. if you're using more than 2 different languages at once you're probably up to no good. |
13:06 | <@gnolam> | {{citation needed}} |
13:06 | | Her is now known as Checkmate |
13:09 | < AnnoDomini> | Hmm. How do I focus on a textarea using Javascript? |
13:09 | < AnnoDomini> | I'm trying $( "#whatever" ).focus(); and it isn't doing anything. |
13:11 | < AnnoDomini> | Then again, I'm not sure I'm using this properly. |
13:11 | <@TheWatcher> | Are you doing it in a $(document).ready( function() { .... });? |
13:12 | <@TheWatcher> | (ie: the DOM needs to be fully loaded before you can set the focus) |
13:12 | < AnnoDomini> | I've pasted it into the same function that gets run when a button is clicked. |
13:12 | < AnnoDomini> | The button summons a dropdown modal window. |
13:12 | <@Tarinaky> | gnolam: https://en.wikipedia.org/wiki/IDN_homograph_attack#Defending_against_the_attack |
13:13 | <@gnolam> | Yeah, not remotely the same thing. |
13:13 | <@TheWatcher> | AnnoDomini: let me just check to be sure, you do actually have jQuery loaded, right? >.> |
13:13 | < AnnoDomini> | I think so. Bootstrap requires it. |
13:13 | <@TheWatcher> | 'kay |
13:13 | <@Tarinaky> | gnolam: It's not? |
13:13 | <@gnolam> | No. |
13:14 | <@TheWatcher> | AnnoDomini: Hm. And you're not getting anything out in the console about calls on an undefined value? |
13:15 | <@Tarinaky> | "Aside from its better known, and more malicious, purposes, homograph spoofing can be used for better purposes, such as address munging, to thwart spam bots." |
13:15 | < AnnoDomini> | TheWatcher: It complains about getUserData() being deprecated, otherwise nothing. |
13:16 | <@Tarinaky> | Erp, misread. |
13:16 | <@Tarinaky> | Disregard that. |
13:16 | | * Tarinaky goes back to work properly |
13:18 | < AnnoDomini> | TheWatcher: It goes like $('#hashtag').on('smth.or.other'),function(event) { ... <insert code here> }); |
13:22 | < AnnoDomini> | How would you focus on a textarea identified by id? |
13:27 | <@TheWatcher> | http://jsfiddle.net/k1r8tnr1/ |
13:30 | < AnnoDomini> | Hmm. What if I have many buttons? Can I use .testbutton? |
13:33 | | Thalasleep is now known as Thalass |
13:34 | <@TheWatcher> | I don't follow the question. |
13:48 | < [R]> | <himi> [R]: without going back to checking the RFCs, I could have sworn that 822 disallowed spaces in the whole thing <-- you need to double-quote the user part. But if you do that you can add a bunch of stuff, like spaces and at-signs. |
14:00 | < AnnoDomini> | TheWatcher: I have a whole mess of buttons that differ only by some custom-field data. I can't very well set them the same #tag, that's not how it works. |
14:04 | <@TheWatcher> | ah, so you're asking if you can use a class? Yes: http://jsfiddle.net/k1r8tnr1/1/ |
14:07 | < AnnoDomini> | What if it's a link that pretends to look like a button? |
14:16 | < AnnoDomini> | Hmm. It works in the fiddle. |
14:16 | < AnnoDomini> | But for some reason doesn't in my project. |
14:21 | < AnnoDomini> | OK, coworker helped me! |
14:21 | < AnnoDomini> | Thanks for your help too, though. |
14:30 | <@TheWatcher> | Sure |
14:44 | | Derakon[AFK] is now known as Derakon |
15:33 | | Checkmate [Z@Nightstar-484uip.cust.comxnet.dk] has quit [Ping timeout: 121 seconds] |
17:46 | | Vash [Vash@Nightstar-uhn82m.ct.comcast.net] has joined #code |
17:46 | | mode/#code [+o Vash] by ChanServ |
17:54 | <&McMartin> | http://arstechnica.com/security/2015/02/lenovo-pcs-ship-with-man-in-the-middle-a dware-that-breaks-https-connections/ |
17:54 | <&McMartin> | gj |
17:58 | <&Derakon> | That kind of crap may well be illegal. |
17:58 | <&Derakon> | And if it's not, it probably should be. |
18:09 | <&McMartin> | http://arstechnica.com/security/2015/02/lenovo-honestly-thought-youd-enjoy-that- superfish-https-spyware/ |
18:09 | <&McMartin> | This stinks to me of "if we say literally anything else we will have people go to jail" |
18:09 | <&McMartin> | Maybe I'm not cynical enough. |
18:09 | <&McMartin> | That sounds tricky |
18:14 | | celticminstrel [celticminst@Nightstar-j5b.hci.93.65.IP] has joined #code |
18:14 | | mode/#code [+o celticminstrel] by ChanServ |
18:17 | | Turaiel[Offline] is now known as Turaiel |
18:18 | | Turaiel is now known as Turaiel[Offline] |
19:10 | <&jerith> | If nothing else, that should attract lawsuits from banks. |
20:43 | | Kindamoody|afk is now known as Kindamoody |
21:34 | | Checkmate [Z@Nightstar-484uip.cust.comxnet.dk] has joined #code |
21:34 | | mode/#code [+o Checkmate] by ChanServ |
21:55 | | Alek is now known as Chi |
21:57 | | Chi is now known as Alek |
22:08 | | himi [fow035@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds] |
23:08 | | Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code |
23:08 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
23:12 | | Kindamoody is now known as Kindamoody[zZz] |
23:14 | | McMartin [mcmartin@Nightstar-rpcdbf.sntcca.sbcglobal.net] has quit [[NS] Quit: reboot] |
23:18 | | McMartin [mcmartin@Nightstar-rpcdbf.sntcca.sbcglobal.net] has joined #code |
23:18 | | mode/#code [+ao McMartin McMartin] by ChanServ |
23:56 | | himi [fow035@Nightstar-dm0.2ni.203.150.IP] has joined #code |
23:56 | | mode/#code [+o himi] by ChanServ |
--- Log closed Fri Feb 20 00:00:18 2015 |