Automatic text replacement let users spoof URLs ending in x, like netflix.com.

Elon Musk’s clumsy brand shift from Twitter to X caused a potentially big problem this week when the social network started automatically changing “twitter.com” to “x.com” in links. The automatic text replacement reportedly applied to any URL ending in “twitter.com” even if it wasn’t actually a twitter.com link.

The change apparently went live on X’s app for iOS, but not on the web version. It seems to have been a problem for a day or two before the company fixed the automatic text replacement so that it wouldn’t affect non-Twitter.com domains.

Security reporter Brian Krebs called the move “a gift to phishers” in an article yesterday. It was a phishing risk because scammers could register a domain name like “netflitwitter.com,” which would appear as “netflix.com” in posts on X, but clicking the link would take a user to netflitwitter.com.

“A search at DomainTools.com shows at least 60 domain names have been registered over the past two days for domains ending in ‘twitter.com,’ although research so far shows the majority of these domains have been registered ‘defensively’ by private individuals to prevent the domains from being purchased by scammers,” Krebs wrote.

  • @[email protected]
    link
    fedilink
    37 months ago

    armchair developer here, but it wouldn’t be that hard, right? Isn’t it just a single line at the very root of the domain in .htaccess - or whatever equivalent if there’s a different stack

    • @WindyRebel
      link
      2
      edit-2
      7 months ago

      I’ve never done the actual implementation myself, honestly. Redirects can be done via .htaccess (or equivalent), server side, or JavaScript.

      Theoretically, yes, it’s that easy. However, pages should have 1:1 redirects for each page URL that matters. Then a strategy to prune the ones no longer needed/outdated by allowing them to 404, redirect to the most relevant subfolder, or just send to the main domain should be considered.

      The list can be quite long. There’s more to it than all this as well, but that’s the general gist.

      • @[email protected]
        link
        fedilink
        37 months ago

        yeah I assumed everything stayed the same except domain - and if best practices are maintained then everything should have relative urls anyway…