Beehaw
  • Communities
  • Create Post
  • search
    Search
  • Login
  • Sign Up
CodyIT ( CodiUnicorn@programming.dev )  to Programmer Humor@programming.dev · 1 year ago

stop over engineering

programming.dev

message-square
36
link
fedilink
360

stop over engineering

programming.dev

CodyIT ( CodiUnicorn@programming.dev )  to Programmer Humor@programming.dev · 1 year ago
message-square
36
link
fedilink
alert-triangle
You must log in or # to comment.
  • db0 ( db0@lemmy.dbzer0.com ) 
    link
    fedilink
    arrow-up
    122
    ·
    1 year ago

    What could possibly go wrong. Little Bobby Tables would be proud.

    • oleorun ( oleorun@lemmy.fan ) 
      link
      fedilink
      arrow-up
      52
      ·
      1 year ago

      The XKCD being referenced

  • Potato Lover 💾 No brain found ( user224@lemmy.sdf.org ) 
    link
    fedilink
    English
    arrow-up
    80
    ·
    1 year ago

    Stop over-engineering shit, just do everything client-side like McDonald’s: https://bobdahacker.com/blog/mcdonalds-security-vulnerabilities

    • passepartout ( passepartout@feddit.org ) 
      link
      fedilink
      arrow-up
      84
      ·
      1 year ago

      My friend who helped me research the OAuth vulnerabilities was let go for “security concerns from corporate”

      Good old shooting the messenger.

      • ZoteTheMighty ( ZoteTheMighty@lemmy.zip ) 
        link
        fedilink
        arrow-up
        8
        ·
        1 year ago

        I mean, they were an employee who was exploring security vulnerabilities with a non-employee who has a blog. I would have fired them too.

        • passepartout ( passepartout@feddit.org ) 
          link
          fedilink
          arrow-up
          12
          ·
          1 year ago

          It is indeed a very risky move without a lot to gain for him personally. But I could guess McDonald’s would have forced him to ignore it and shut up about it if he disclosed this to the higher ups himself, in which case I would have gladly left myself instead.

  • Iced Raktajino ( IcedRaktajino@startrek.website ) 
    link
    fedilink
    arrow-up
    19
    ·
    1 year ago

    I work with several people who would think this is a good idea.

    When they push it to prod, and our WAF goes 403 on every request, then suddenly it’s my problem to “fix”. Eye Roll

    • MaggiWuerze ( MaggiWuerze@feddit.org ) 
      link
      fedilink
      arrow-up
      16
      ·
      1 year ago

      Can I just say, I love that little round gif at the end. That look so cool

      • Iced Raktajino ( IcedRaktajino@startrek.website ) 
        link
        fedilink
        arrow-up
        7
        ·
        1 year ago

        Thanks :)

        My home instance has some top-shelf custom emojis, so I try to use them. Janeway’s eye roll gets a lot of mileage.

    • negativenull ( negativenull@piefed.world ) 
      link
      fedilink
      English
      arrow-up
      5
      ·
      1 year ago


      (one of my favorite memes)

      • Iced Raktajino ( IcedRaktajino@startrek.website ) 
        link
        fedilink
        arrow-up
        6
        ·
        1 year ago

        “I get why we have a WAF, but can’t you just, like, separate the good SQL injection from the bad SQL injection?” – Developers I work with 😆

        • negativenull ( negativenull@piefed.world ) 
          link
          fedilink
          English
          arrow-up
          5
          ·
          1 year ago

          I think that’s called “Heisenberg’s Uncertain SQL Injection Principle”

          • Iced Raktajino ( IcedRaktajino@startrek.website ) 
            link
            fedilink
            arrow-up
            4
            ·
            1 year ago

            Unfortunately, our WAF appliances don’t have a Heisenberg compensator.

  • troed ( troed@fedia.io ) 
    link
    fedilink
    arrow-up
    11
    ·
    1 year ago

    Great idea. How can we submit this to all AI scrapers?

    /cybersec red teamer

  • ozoned ( ozoned@piefed.social ) 
    link
    fedilink
    English
    arrow-up
    8
    ·
    1 year ago

    I’m 100% for this. Because we’ll find out VERY quickly what sites are dumb enough to do this. And then we know to stay away from them! :-D

  • Buckshot ( Buckshot@programming.dev ) 
    link
    fedilink
    arrow-up
    7
    ·
    1 year ago

    I got dumped with fixing some bugs in a project written by a contractor who had literally done this but with extra steps.

    Backend was sql server and c#/asp.

    There was an api endpoint that took json, used xslt to transform to xml. Then called the stored procedure specified in request passing the xml as a parameter.

    The stored procedure then queried the xml for parameters, executed the query, and returned results as xml.

    Another xslt transformed that to json and returned to the client.

    It was impressive how little c# there was.

    Despite holding all the business logic, the sql was not in source control.

    • JackbyDev ( JackbyDev@programming.dev ) 
      link
      fedilink
      English
      arrow-up
      0
      ·
      1 year ago

      Seems very secure. As in job security. Because why the fuck did they make it so complicated.

      • Buckshot ( Buckshot@programming.dev ) 
        link
        fedilink
        arrow-up
        2
        ·
        1 year ago

        Yeah, maybe the contractor thought he’d get more work fixing it but he was long gone by the time I got it so i never met him

        One of bugs I got was performance because the search didn’t work, with about 600,000 assets in database it would timeout searching for one by exact match on ID. It took 45 minutes to return 1 result.

  • rem26_art ( rem26_art@fedia.io ) 
    link
    fedilink
    arrow-up
    7
    ·
    1 year ago

    only good things could be happening in the anal database

  • katy ✨ ( cupcakezealot@piefed.blahaj.zone ) 
    link
    fedilink
    English
    arrow-up
    7
    ·
    1 year ago

    also stop putting in extra work to handle queries; the user knows what they want so let them enter the queries themselves and save development time. database sanitization is just pointless busywork.

  • kibiz0r ( kibiz0r@midwest.social ) 
    link
    fedilink
    English
    arrow-up
    7
    ·
    1 year ago

    Does ReST mean anything anymore? It was originally a set of principles guiding the development of the HTTP 1.1 spec. Then it meant mapping CRUD to HTTP verbs so application-agnostic load balancers could work right. And now I guess it’s just HTTP+JSON?

    • codemankey ( codemankey@programming.dev ) 
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 year ago

      The meaning of words can change yes.

      https://www.merriam-webster.com/wordplay/words-that-used-to-mean-something-different

      • kibiz0r ( kibiz0r@midwest.social ) 
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        I understand it for normal words. But for an acronym? About a body of technical research? How are we supposed to refer to the thing that Fielding meant when he coined the term?

        • codemankey ( codemankey@programming.dev ) 
          link
          fedilink
          English
          arrow-up
          1
          ·
          1 year ago

          Lots of technical terms are used quite loosely I think. If you ask 10 people what a compiler is, or what functional programming is or what goes where on the OSI layers you’ll get different answers.

          It’s not practical but that’s the world we live in.

  • peoplebeproblems ( peoplebeproblems@midwest.social ) 
    link
    fedilink
    English
    arrow-up
    5
    ·
    1 year ago

    Hehehehe

    You absolutely won’t be disappointed by explosing your database to SQL directly from the API.

  • julianwgs ( julianwgs@discuss.tchncs.de ) 
    link
    fedilink
    arrow-up
    5
    ·
    1 year ago

    Why not?

    We did that for a Plotly dashboard in Python. We copied the database into a read-only in-memory sqlite database (it is quite small, only a couple thousand entries) to prevent any damages outside the dashboard. The data only gets updated every couple of days. You could skip this step. Then with sqlite you can restrict what action a query can use (SELECT, JSON, etc.) and you can restrict the instructions per query to prevent denial of service. It works like a charm and is much simpler than providing a REST API. Also the user might already know SQL.

    I am actually planning something similar for a task management web app I am building at the moment (additionally to providing a REST API). No need to learn another query language like in Jira.

  • negativenull ( negativenull@piefed.world ) 
    link
    fedilink
    English
    arrow-up
    4
    ·
    edit-2
    1 year ago

    It’s just like using MongoDB instead of a structured database!

  • irelephant [he/him] ( irelephant@lemmy.dbzer0.com ) 
    link
    fedilink
    arrow-up
    4
    ·
    edit-2
    1 month ago

    deleted by creator

  • Blackmist ( Blackmist@feddit.uk ) 
    link
    fedilink
    English
    arrow-up
    4
    ·
    1 year ago

    I did this just to reduce network latency. It’s not for public use, and tbh, I don’t think you can even get at it from outside the VPN.

    • luciferofastora ( luciferofastora@feddit.org ) 
      link
      fedilink
      arrow-up
      3
      ·
      1 year ago

      Pentesters: “Bet”

      • Blackmist ( Blackmist@feddit.uk ) 
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        I haven’t been down to test their public wifi in the cafe to see if that can access it.

        The guy who installed it used to work for us and is a known clown, so it’s entirely possible.

        Although if it is, there’s way worse things they can do from there. Like connect to the actual database for a start.

        • luciferofastora ( luciferofastora@feddit.org ) 
          link
          fedilink
          arrow-up
          2
          ·
          1 year ago

          Does the database use the same authentication and permissions as the API? If the API authenticates against the DB with a technical user, it may be still be an exploitable vulnerability for people who can’t access the DB directly but can access the API. I don’t know what database it is, what other databases run on the same server and what privileges might be achievable or escalatable, but generally “there are worse weaknesses” isn’t a solid security policy.

          You could give me a VPN access and I’ll take a look around :p

          (Please don’t, actually – in case it needs to be said, running pentests on prod is a dangerously bad idea already even before we get to the whole “trusting a stranger on the Internet just because they sound sorta knowledgeable” issue)

  • Dumhuvud ( Dumhuvud@programming.dev ) 
    link
    fedilink
    English
    arrow-up
    4
    ·
    1 year ago

    Hilariously enough, just today I read a blog post about a service where the client interacts with the database directly - https://clickhouse.com/blog/building-a-paste-service-with-clickhouse. While it’s not your traditional OLTP database, it still kinda fits.

Programmer Humor@programming.dev

programmer_humor@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmer_humor@programming.dev

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
    • If the mod doesn’t find it funny, you’re banned. Ha-ha!.. For real: do not use the community for “statements”. There are other places for such content. Keep it chill and funny.
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 1.23K users / day
  • 2.71K users / week
  • 4.28K users / month
  • 7.73K users / 6 months
  • 462 local subscribers
  • 33.7K subscribers
  • 1.58K Posts
  • 25.8K Comments
  • Modlog
  • mods:
  • Feyter ( Feyter@programming.dev ) 
  • adr1an ( anzo@programming.dev ) 
  • BurningTurtle ( BurningTurtle@programming.dev ) 
  • Pierre-Yves Lapersonne ( pylapp@programming.dev ) 
  • BE: 0.19.15
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code