WTF Bites


  • Notification Spam Recipient

    @loopback0 said in WTF Bites:

    CSS doesn't change.

    No. No it does not.


  • Java Dev

    @topspin said in WTF Bites:

    @PleegWat but they don’t have to sit in meetings. 🎺

    What do you call it if you have sound and video on and everyone else is typing in chat?


  • Discourse touched me in a no-no place

    @PleegWat A seminar.



  • @LaoC

    CREATE OR REPLACE FUNCTION is_tragedy (VARCHAR) RETURNS BOOLEAN STABLE AS $$
     SELECT replace($1,'_','') LIKE %george%floyd%'
    $$ LANGUAGE SQL;
    

    Can someone explain :wtf: is this code?


  • Discourse touched me in a no-no place

    @Gomesz785 Start at the innermost bit and work out.

    replace($1,'_','') removes underscores.

    … LIKE %george%floyd%' is a typo; … LIKE '%george%floyd%' would be more expected (and % is a general wildcard in an SQL LIKE).

    The bits outside of that are PostgreSQL stuff to create a function called is_tragedy that takes a string and returns a boolean, while noting that the function is stable (always returns the same thing for the same arguments of a particular query, a fact that the optimizer finds very useful). See https://www.postgresql.org/docs/8.3/xfunc-volatility.html for details.

    Deeper meaning than that is for you to determine, and is very likely to lead to :trolley-garage:



  • @dkf said in WTF Bites:

    … LIKE %george%floyd% is a typo; … LIKE '%george%floyd%'

    It was a typo by me.

    create a function called is_tragedy that takes a string and returns a boolean, while noting that the function is stable.

    So they get the username, remove underscores and then checks is it like '%george%floyd%'? How do they check the similarity? let's forget the boolean and return for a bit.



  • And because onebox shows the issue summary rather then the comment referenced by the fragment, here's the latest comment (made today, after ¾ of a year of basically inactivity).

    Hi team, is there any progress to report on the migration from the Active Directory Graph to the new Microsoft Graph? This issue is getting pretty urgent by now. In Azure we cannot give Service Principals API permissions on the old Active Directory Graph anymore (option is greyed out with a notification that you should use the new Microsoft Graph instead). Which means that for newly created Service Principals, we are currently unable to use az ad commands in our automation workflows. I find it strange that Microsoft is still using this deprecated API in their own Azure CLI tooling while simultaneously Microsoft is not allowing Service Principals to use this API anymore. It would be great if the Microsoft Graph API Support in Azure CLI could be given some more priority.


  • Discourse touched me in a no-no place

    @dkf said in WTF Bites:

    … LIKE %george%floyd%' is a typo; … LIKE '%george%floyd%' would be more expected (and % is a general wildcard in an SQL LIKE).

    It's correct in the link above

    CREATE OR REPLACE FUNCTION is_tragedy (VARCHAR) RETURNS BOOLEAN STABLE AS $$
     SELECT replace($1,'_','') LIKE '%george%floyd%'
    $$ LANGUAGE SQL;
    


  • @dkf said in WTF Bites:

    and is very likely to lead to :trolley-garage:

    to :trolley-garage: = what?



  • @loopback0 said in WTF Bites:

    It's correct in the link above

    fuck yeah. just imagine my computer is hacked.


  • Notification Spam Recipient

    @Gomesz785 said in WTF Bites:

    @dkf said in WTF Bites:

    and is very likely to lead to :trolley-garage:

    to :trolley-garage: = ?

    Someone really needs to link you the forum terminology thread...

    📖 Teh Official Discopædia (Forums Dictionary)

    I have raised the Warthog, pray I raise it no further!

    Edit: wait, shit, is there no definition for the bike shed there? Someone help me out with a search...


  • BINNED

    @Gomesz785 said in WTF Bites:

    @dkf said in WTF Bites:

    and is very likely to lead to :trolley-garage:

    to :trolley-garage: = what?

    A special kind of hell located in a forum subcategory here, for which you do not yet have the required Operating Thetan level to access.



  • @topspin So if I said

    debug A in the end you will get to :trolley-garage:

    that means A is hard to debug?


  • BINNED

    @Gomesz785 said in WTF Bites:

    @topspin So if I said

    debug A in the end you will get to :trolley-garage:

    that means A is hard to debug?

    No, it means discussions about it will likely turn out very controversial, for example because they touch politics, and thus should be kept outside of the general area of the forum and instead belong in the special place designated for controversial discussions, politics, and trolling, which is called the "troll‍eybus garage".



  • @topspin

    Full reply I received:

    @Gomesz785 Start at the innermost bit and work out.

    replace($1,'_','') removes underscores.

    … LIKE %george%floyd%' is a typo; … LIKE '%george%floyd%' would >be more expected (and % is a general wildcard in an SQL LIKE).

    The bits outside of that are PostgreSQL stuff to create a function called is_tragedy that takes a string and returns a boolean, while noting that the function is stable (always returns the same thing for the same arguments of a particular query, a fact that the optimizer finds very useful). See https://www.postgresql.org/docs/8.3/xfunc-volatility.html for details.

    Deeper meaning than that is for you to determine, and is very likely to lead to :trolley-garage:

    So he's saying don't learn the other code-knowledge (but why?) or.... I will start the next 🏳 vs 🏴 ?



  • @Gomesz785 said in WTF Bites:

    So they get the username, remove underscores and then checks is it like '%george%floyd%'? How do they check the similarity? let's forget the boolean and return for a bit.

    The database checks that the username, after underscores have been removed, whether it contains george somewhere in it and then floyd somewhere further on. E.g., curiousgeorgepinkfloydslashfic.



  • @Gomesz785 said in WTF Bites:

    @topspin

    Full reply I received:

    @Gomesz785 Start at the innermost bit and work out.

    replace($1,'_','') removes underscores.

    … LIKE %george%floyd%' is a typo; … LIKE '%george%floyd%' would >be more expected (and % is a general wildcard in an SQL LIKE).

    The bits outside of that are PostgreSQL stuff to create a function called is_tragedy that takes a string and returns a boolean, while noting that the function is stable (always returns the same thing for the same arguments of a particular query, a fact that the optimizer finds very useful). See https://www.postgresql.org/docs/8.3/xfunc-volatility.html for details.

    Deeper meaning than that is for you to determine, and is very likely >to lead to :trolley-garage:

    So he's saying don't learn the other code-knowledge (but why?) or.... I will start the next 🏳 vs 🏴 ?

    No he's saying that the reason they want to do whatever with queries with anything George Floyd is a highly flammable topic, and this forum has a sequestered part where such discussions are supposed to go.
    It's got pretty little to do with the actual code and it's function and everything to do with politics.
    As far as what the LIKE does, it checks for the two words George and Floyd in that order anywhere in the string, and the two words can be separated by any numbers of characters.

    :trolley-garage: is forum shorthand for the area of the forum where sensitive topics is vehemently screamed about.



  • @Watson the order of it? eg: georgefloyd and floydgeorge


  • Discourse touched me in a no-no place

    @Tsaukpaetra said in WTF Bites:

    Edit: wait, shit, is there no definition for the bike shed there? Someone help me out with a search...

    :trolley-garage: isn't a bike shed

    Alex had a "tidy up" though in the Discopaedia. Pray he doesn't tidy it up further.


  • Discourse touched me in a no-no place

    @Gomesz785 It's literally checking for anythinggeorgeanythingfloydanything after stripping all underscores. It won't find geo.rge.flo.yd. Or floydgeorge. Or dyolfegroeg or anything like that.

    It's a very dumb piece of code. Much smarter would be pulling the patterns out of a database table (though that'd make the function ineligible for some optimizations).


  • ♿ (Parody)

    @Gomesz785 take a look in particular at the "Limited Access Categories" part of this:

    https://what.thedailywtf.com/topic/27756/wtf-is-wtdwtf-getting-started-faq-history



  • @dkf said in WTF Bites:

    Much smarter would be pulling the patterns out of a database table (though that'd make the function ineligible for some optimizations).

    Agree with the shity-ness, anyway what kind of database table do you think?


  • Discourse touched me in a no-no place

    @Gomesz785 said in WTF Bites:

    what kind of database table do you think?

    No idea. Whatever PostgreSQL supports I guess.


  • Grade A Premium Asshole

    This morning starts out with a user sending an email to our ticketing system and copying me and their executive director on it and the email starts with:

    "This is my third email reporting this issue and I have yet to get a reply....."

    The issue they are reporting, apparently for the third time (and it appears legit as there is an email chain at the bottom of it and I doubt they are sophisticated enough to forge it), is that some of their emails are not sending or being received.

    Did they ever consider that their first two emails might have ended up in the same black hole that the emails they are reporting vanished to? Of course not!


  • BINNED

    @Gomesz785 said in WTF Bites:

    @topspin

    Full reply I received:

    @Gomesz785 Start at the innermost bit and work out.

    replace($1,'_','') removes underscores.

    … LIKE %george%floyd%' is a typo; … LIKE '%george%floyd%' would >be more expected (and % is a general wildcard in an SQL LIKE).

    The bits outside of that are PostgreSQL stuff to create a function called is_tragedy that takes a string and returns a boolean, while noting that the function is stable (always returns the same thing for the same arguments of a particular query, a fact that the optimizer finds very useful). See https://www.postgresql.org/docs/8.3/xfunc-volatility.html for details.

    Deeper meaning than that is for you to determine, and is very likely to lead to :trolley-garage:

    So he's saying don't learn the other code-knowledge (but why?) or.... I will start the next 🏳 vs 🏴 ?

    Some of this is our fault for talking to you in emojis, but what it comes down to us that there's two ways to parse your initial question.

    One plausible parsing is

    1. I don't know SQL well enough to know what this function does.

    The other parsing is either

    2A. Why would it be useful to have a function called is_tragedy that returns TRUE if a string contains the substrings "George" and "Floyd"?

    Or with a little added context that was in the post

    2B. Why would Twitch disallow usernames that include the substrings "George" and "Floyd"?

    This topic is in the "Megatopics" category, where the General rules are in effect. These rules are in place because people want a fourm where we can talk about IT issues and leave other topics out of it. Question #1, but not question #2, are appropriate here.

    There's a different category of this forum called the Trolleybus Garage, where the rules are different. Among other things, politics are a valid topic of discussion. Other valid things to post there are joke answers and personal attacks. The category is named for 🚎, the :trolleybus: emoji, because back before we had different categories we used the 🚎 emoji in the topic name to indicate that the set of rules that allow trolling were in effect. (:trolley-garage: is the emoji that means Trolleybus Garage.)

    Either form of question #2 would be appropriate in a topic in the Trolleybus Garage, but this kind of obviously controversial discussion isn't allowed in topics with the General rules in place.

    So you know, when I read your post I thought your question was #2, and if you were a more well known poster (someone who I would have expected to know the rules), I would have asked a moderator to move your post out of this topic and into the Garage. (Our slang for the act of a moderator moving a post from one topic to another is to "Jeff" the post.)

    I post in the Garage a lot. It's a fun place, and I've learned a lot there. If you're interested in a place where you can shitpost about politics and controversial topics, the Garage might be for you.

    But if not, the rules in the rest of the forum are that you're not supposed to post about politics or similar contentious topics.


  • Notification Spam Recipient

    @loopback0 said in WTF Bites:

    @Tsaukpaetra said in WTF Bites:

    Edit: wait, shit, is there no definition for the bike shed there? Someone help me out with a search...

    :trolley-garage: isn't a bike shed

    Alex had a "tidy up" though in the Discopaedia. Pray he doesn't tidy it up further.

    Yeah I suppose I had a dereference-to-text error there. It happens from time to time.



  • @dkf said in WTF Bites:

    No idea. Whatever PostgreSQL supports I gues

    No, I mean what will be in the data? How will they identify these "names" are close to George Floyd (or whatever this confusing-thing going in usa, I am in SL)?

    Something like:

    "GeorgeFloyd"
    "georgeyflod"
    "FloydGeorge"
    "SupportGFloys"
    

    this?



  • @GuyWhoKilledBear said in WTF Bites:

    But if not, the rules in the rest of the forum are that you're not supposed to post about politics or similar contentious topics.

    No, My question wasn't about the "crazy topic" or "why would twitch filter the crazy topic?

    1. I don't know SQL well enough to know what this function does.

    That was my initial question. Then he explained it (halfway). The other half he left to me to work out (I mean if he don't like to teach it to me, fine). but then he goes to say this:

    Deeper meaning than that is for you to determine, and is very likely to lead to :trolley-garage:

    :wt actual f:

    Deeper meaning says either:

    1. the deeper knowledge about the code
    2. the thing about crazy topic

    I thought it was 1. So I asked why does learning SQL leads me to :trolley-garage: ?.

    When he meant it was 2. Then when you guys started to introduce the trolleybus place I kinda got where this was leading.


    @dkf @Watson So I was asking what is the stuff about the checking and the boolean return thing.


  • Banned

    @Gomesz785 said in WTF Bites:

    @dkf said in WTF Bites:

    No idea. Whatever PostgreSQL supports I gues

    No, I mean what will be in the data? How will they identify these "names" are close to George Floyd (or whatever this confusing-thing going in usa, I am in SL)?

    Ever searched files in Windows file explorer? Ever used * in there? % in SQL is like * in Windows file explorer. There can be anything in the % bits, but the non-% bits must match exactly.



  • @Gąska I am asking not how the sql filter works! I am asking where do they find a database? I mean what will be in the data of the database? How will they identify that this database contains "names" that are close to George Floyd (or whatever this confusing-thing going in usa, I am in SL)?


  • Considered Harmful

    @loopback0 said in WTF Bites:

    @Tsaukpaetra seems to be how Webkit renders it.

    57b90f61-9c3d-41eb-bcd4-1eefd74f8d05-image.png

    Safari on the right, Firefox on the left.
    CSS doesn't change.

    It's fine on Chromium so it can't be Webkit's fault. Must be Safari's brain damage.


  • BINNED

    @Gomesz785 said in WTF Bites:

    @dkf said in WTF Bites:

    No idea. Whatever PostgreSQL supports I gues

    No, I mean what will be in the data? How will they identify these "names" are close to George Floyd (or whatever this confusing-thing going in usa, I am in SL)?

    Something like:

    "GeorgeFloyd"
    "georgeyflod"
    "FloydGeorge"
    "SupportGFloys"
    

    this?

    My assumption, based on what I read on the forum, is that is not checking things in the database yet. This is one of several validation functions for Twitch usernames.

    The workflow is presumably:

    1. The user types a proposed username into a field on the Twitch registration website (or in the Android app, or the Xbox app, or wherever). Literally any string could be typed into that field, including deliberately malicious strings that could be typed by bad actors.

    2. The database runs a bunch of validation functions against the proposed usernames. One of those is the is_tragedy function.

    3. If all the validation functions say the string is OK, then the user is allowed to register and the name is written to the database. If one of the validation functions returns true, the website shows the user an error and tells them to pick a different username.


  • Discourse touched me in a no-no place

    @LaoC said in WTF Bites:

    @loopback0 said in WTF Bites:

    @Tsaukpaetra seems to be how Webkit renders it.

    57b90f61-9c3d-41eb-bcd4-1eefd74f8d05-image.png

    Safari on the right, Firefox on the left.
    CSS doesn't change.

    It's fine on Chromium so it can't be Webkit's fault. Must be Safari's brain damage.

    Chromium doesn't use Webkit.


  • Considered Harmful

    @Watson said in WTF Bites:

    @Gomesz785 said in WTF Bites:

    So they get the username, remove underscores and then checks is it like '%george%floyd%'? How do they check the similarity? let's forget the boolean and return for a bit.

    The database checks that the username, after underscores have been removed, whether it contains george somewhere in it and then floyd somewhere further on. E.g., curiousgeorgepinkfloydslashfic.

    Or, for another function, "bragging", "tail-wagging", "nonaggressive", "unaggravated", "lagging" or "whiggery".


  • Considered Harmful

    @loopback0 said in WTF Bites:

    @LaoC said in WTF Bites:

    @loopback0 said in WTF Bites:

    @Tsaukpaetra seems to be how Webkit renders it.

    57b90f61-9c3d-41eb-bcd4-1eefd74f8d05-image.png

    Safari on the right, Firefox on the left.
    CSS doesn't change.

    It's fine on Chromium so it can't be Webkit's fault. Must be Safari's brain damage.

    Chromium doesn't use Webkit.

    Oops. Uh. Frontend matters¹ :facepalm:

    ¹ As in "Front matter", not "Black Lives Matter"


  • Banned

    @Gomesz785 said in WTF Bites:

    @Gąska I ama sking not how the sql filter works! I am asking where do they find a database?

    Okay, now you're just dumb. Somebody has some database. They downloaded an installer from https://www.postgresql.org/ or wherever and installed it, and then did a bunch of INSERTs to put some data inside it. Where else do you think databases come from!?



  • @Gąska said in WTF Bites:

    Where else do you think databases come from!?

    Well you see, when a bunch of rows and columns are in love with each other...


  • Considered Harmful

    @Zerosquare said in WTF Bites:

    @Gąska said in WTF Bites:

    Where else do you think databases come from!?

    Well you see, when a bunch of rows and columns are in love with each other...

    They DROP ACID and go on a Date together to coddle?


  • Notification Spam Recipient

    cdd3bf6e-e27a-4313-aff2-0d659006e4f1-image.png

    :wtf_owl:


  • BINNED

    @Zerosquare said in WTF Bites:

    @Gąska said in WTF Bites:

    Where else do you think databases come from!?

    Well you see, when a bunch of rows and columns are in love with each other...

    My wife is watching a movie on the Hallmark Channel where the woman moves to a small town to start a furniture refinishing business after she breaks up with her photographer fiance, who doesn't treat her right.

    Then she gets entered into a furniture making contest with a guy, presumably by her friend or someone who's meddling. They initially don't like each other, but they bond and fall in love while they CREATE TABLE.

    This being the Hallmark Channel, all the INSERTs happen after the credits roll.



  • @DogsB The files are stored on a different domain using different, high-throughput servers. The only cookie those servers get is a token representing permission to download individual files, not the everything-and-the-kitchen-sink that anything under google.com gets. The way that cookie is set is considered by browsers to be third-party.



  • @TwelveBaud We got bitten by something not exactly the same but similar. We set up an app link for our iOS app so the links in the emails would open in the app. But it turns out that the way we did it meant that any attempt to get to our website would also open in the app. Because Safari doesn't ask how to open such links--it assumes that if it's a different domain (fully qualified domain at that), or must mean you want to open it in the app. So even trying to log in from our main website (foo.com) to the web interface (console.foo.com) triggered the link. :facepalm:


  • Considered Harmful

    FBNxWroVgAQwJpV.png
    :you-dont-say:


  • 🚽 Regular

    @LaoC On the plus side, you'll keep getting Windows 95 updates.


  • Considered Harmful

    @Zecc said in WTF Bites:

    @LaoC On the plus side, you'll keep getting Windows 95 updates.

    [dubiousdiscuss]



  • @Gąska I am asking how will they identify that this database contains "names" that are close to George Floyd (or whatever this confusing-thing going in usa, I am in SL) It's about choosing a database, not that finding a database?



  • @GuyWhoKilledBear I am asking not how the sql filter works! I am asking where do they find a database? I mean what will be in the data of the database? How will they identify that this database contains "names" that are close to George Floyd (or whatever this confusing-thing going in usa, I am in SL)?



  • @Gomesz785 said in WTF Bites:

    I mean what will be in the data of the database?

    Probably user names, chat messages, etc.?


  • BINNED

    @Gomesz785 said in WTF Bites:

    @GuyWhoKilledBear I am asking not how the sql filter works! I am asking where do they find a database? I mean what will be in the data of the database? How will they identify that this database contains "names" that are close to George Floyd (or whatever this confusing-thing going in usa, I am in SL)?

    Do you know what Twitch is?

    It's their database. They run a website that people make accounts on, and they use this function to reject controversial usernames.


  • Discourse touched me in a no-no place

    @Gomesz785 said in WTF Bites:

    I am asking where do they find a database?

    The code fragment you posted doesn't say. Since it is a function, it could be called from either within other SQL code or externally. When one has access to a full codebase, a global search for the string is_tragedy would give a set of candidate locations for the call.

    I mean what will be in the data of the database?

    Maybe usernames? Maybe some sort of other trigger condition. Can't say.

    How will they identify that this database contains "names" that are close to George Floyd

    By calling this function, duh. 😜


Log in to reply