#dev | Logs for 2018-01-15

« return
[16:04:09] <Bytram> TheMightyBuzzard: while you are around, I gots a couple questions re: bug/issue 402: whitespace in comment subject...
[16:04:38] <TheMightyBuzzard> what about it?
[16:05:11] <Bytram> do you perform ANY kind of transform on what the user submits [change all Zs chars to 0x0020], or is it strictly a filter with [go|nogo] on whether it can be posted at all? or... something else?
[16:06:13] <TheMightyBuzzard> what the user puts in is what will show up in the subject. any transforms we do are strictly on a temporary copy that is not saved.
[16:06:30] <Bytram> k...
[16:07:09] <Bytram> so if I have any 'strange' space/control/formatting chars in my subject, AND I can get it past your filters, then it gets posted exactly as submitted. Correct?
[16:07:21] <TheMightyBuzzard> yes
[16:07:35] * Bytram was afraid you was gonna say that.
[16:07:43] <TheMightyBuzzard> those are stripped elsewhere
[16:07:44] <Bytram> that is a MUCH larger testing surface
[16:08:19] <TheMightyBuzzard> no, because that is not a bug that i fixed. thus it does not need tested right at this moment.
[16:08:42] <Bytram> hrrrm
[16:09:08] <Bytram> what are you flitering for again? 6(?) or more spaces in a row(?) in the comment subject?
[16:09:26] <Bytram> entire subject is only space/control/format chars?
[16:09:46] <TheMightyBuzzard> only be exhaustive on things we've said should be working properly while trying to get a release out. find new bugs when there's no release scheduled.
[16:10:14] <TheMightyBuzzard> certain ratio of space to non-space characters. no, i don't know what the ratio is off the top of my head.
[16:10:37] * Bytram is already exhausted... still fighting off cold and worked inventory last night (fortunately only once per year) worked 6PM to 1-ish AM
[16:10:43] <TheMightyBuzzard> all whitespace should trigger it every time though, which is the only thing i was trying to fix.
[16:11:17] * Bytram looks at: https://github.com
[16:11:29] <Bytram> '/me looks at: https://github.com
[16:13:42] <TheMightyBuzzard> you won't find the ratio in the green bits. it's not something i created. all i did was make existing code include invisible unicode characters.
[16:14:47] <Bytram> in access.pm line 618? replaced all problematic stuff with a space? and then count those spaces?
[16:15:03] <Bytram> oh,wait. wrong file, I thjnkk
[16:15:17] <TheMightyBuzzard> in a temporary copy of the subject, yes, that's what we do.
[16:15:26] <Bytram> Doh! S/b;: Comments.pm
[16:16:13] <Bytram> looks like line 2148 in the new copy?
[16:16:14] <Bytram> my $num_chars = $check_notags =~ s/[^\h\v\p{Cc}\p{Cf}]//g;
[16:16:35] <TheMightyBuzzard> nope, that's the number of substitutions that occurred.
[16:16:50] <Bytram> ugh.
[16:17:18] <TheMightyBuzzard> $check_notags is the copy we work on but it is not what gets inserted into the db
[16:19:01] <Bytram> $check_notags is where we see if it passes muster in having enough non-whitespace chars and, if it does, then THAT is used as a sentinel to determine if we write the unmoderated subject to the db?
[16:19:28] <TheMightyBuzzard> yup. it disappears into the ether after we're done mangling it
[16:19:55] <Bytram> k
[16:20:16] <TheMightyBuzzard> anyway, i need nicotine.
[16:20:54] <Bytram> so, you yanks all the potentially problematic chars from $check_notags (ie. all space (Zs) control (Cc) and format (Cf) chars)... right?
[16:21:03] <Bytram> good plan... i needs more coffee
[16:30:11] <TheMightyBuzzard> actually, no. i turn all the characters at issue to regular old spaces then remove everything that isn't spaces and count the number of characters removed.
[16:30:49] <TheMightyBuzzard> if none were, it's all whitespace.
[16:31:13] <TheMightyBuzzard> we check the ratio after that as well but that's another matter.
[16:37:52] <TheMightyBuzzard> okay, i'm not around anymore. too crabby and bored to be sitting at a computer right now.
[16:42:05] * Bytram just got back
[16:43:54] <Bytram> hmmm
[16:55:13] <Bytram> okay, that helps a lot... me does some looking through the code on github
[22:00:56] <Bytram> chromas: Hi there! Got a question for ya if your are around.
[22:01:19] <chromas> How'd you know?
[22:01:23] <Bytram> lol
[22:01:45] <Bytram> am looking into your space-filled subects... to do you recall what, exactly, you entered for them?
[22:02:22] <Bytram> cf: https://dev.soylentnews.org
[22:02:23] <upstart> ^ 03Story for Testing Issue: #402 - Dev.SN
[22:05:37] <chromas> I think the most recent was three Word Joiners (⁠⁠⁠⁠⁠⁠⁠⁠U+2060) (&#8288;)
[22:06:34] <chromas> Another was three Zero Width Spaces.
[22:06:42] * chromas goes through the auto-complete list.
[22:06:54] <Bytram> okay, so you entered them... how? &#x....; ??
[22:07:34] <chromas> Mixing them works too
[22:07:46] <chromas> Copypasted from character map tool
[22:07:52] <chromas> The actual characters
[22:08:00] <Bytram> okay... just trying to reproduce the problem before I try to see if it was fixed on dev.
[22:08:10] <chromas> Specifically, KCharSelect from KDE/Linux
[22:09:19] <Bytram> ahhh, on a linux(?) box? not that THAT should matter any
[22:09:21] <chromas> On dev I get "Your comment violated the "postersubj" compression filter. Try less whitespace and/or less repetition in the subject line."
[22:09:29] <Bytram> nod nod
[22:09:40] <chromas> So, it appears the filter works. For the moment…>:)
[22:10:06] <Bytram> I had gotten that, too... but wasn't sure that was because it ws fixed, or I was doing something diffrerent than what you did, so was failing to find the right incantation to make it happen.
[22:10:15] * Bytram chuckles