Close Menu
    DevStackTipsDevStackTips
    • Home
    • News & Updates
      1. Tech & Work
      2. View All

      The Case For Minimal WordPress Setups: A Contrarian View On Theme Frameworks

      June 4, 2025

      How To Fix Largest Contentful Paint Issues With Subpart Analysis

      June 4, 2025

      How To Prevent WordPress SQL Injection Attacks

      June 4, 2025

      Smashing Animations Part 4: Optimising SVGs

      June 4, 2025

      I test AI tools for a living. Here are 3 image generators I actually use and how

      June 4, 2025

      The world’s smallest 65W USB-C charger is my latest travel essential

      June 4, 2025

      This Spotlight alternative for Mac is my secret weapon for AI-powered search

      June 4, 2025

      Tech prophet Mary Meeker just dropped a massive report on AI trends – here’s your TL;DR

      June 4, 2025
    • Development
      1. Algorithms & Data Structures
      2. Artificial Intelligence
      3. Back-End Development
      4. Databases
      5. Front-End Development
      6. Libraries & Frameworks
      7. Machine Learning
      8. Security
      9. Software Engineering
      10. Tools & IDEs
      11. Web Design
      12. Web Development
      13. Web Security
      14. Programming Languages
        • PHP
        • JavaScript
      Featured

      Beyond AEM: How Adobe Sensei Powers the Full Enterprise Experience

      June 4, 2025
      Recent

      Beyond AEM: How Adobe Sensei Powers the Full Enterprise Experience

      June 4, 2025

      Simplify Negative Relation Queries with Laravel’s whereDoesntHaveRelation Methods

      June 4, 2025

      Cast Model Properties to a Uri Instance in 12.17

      June 4, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured

      My Favorite Obsidian Plugins and Their Hidden Settings

      June 4, 2025
      Recent

      My Favorite Obsidian Plugins and Their Hidden Settings

      June 4, 2025

      Rilasciata /e/OS 3.0: Nuova Vita per Android Senza Google, Più Privacy e Controllo per l’Utente

      June 4, 2025

      Rilasciata Oracle Linux 9.6: Scopri le Novità e i Miglioramenti nella Sicurezza e nelle Prestazioni

      June 4, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»News & Updates»CodeSOD: Double Checking

    CodeSOD: Double Checking

    February 13, 2025

    Abdoullah sends us this little blob of C#, which maybe isn’t a full-on WTF, but certainly made me chuckle.

    if (file!= null)
    {
      if (file.name.StartsWith(userName))
      {
        if (file.name.StartsWith(userName))
        {
          url = string.Format(FILE_LINK, file.itemId, file.name);
          break;
        }
      }
    }
    

    Are you sure the file name starts with the user name? Are you really sure?

    This code somehow slipped by code review, helped perhaps by the fact that the author was the senior-most team member and everyone assumed they were immune to these kinds of mistakes.

    No one is immune.

    [Advertisement]
    Utilize BuildMaster to release your software with confidence, at the pace your business demands. Download today!

    Source: Read More 

    Facebook Twitter Reddit Email Copy Link
    Previous ArticleFOSS Weekly #25.07: KDE Plasma 6.3, Arch with BTRFS, Flexpilot IDE, Terminal Tips and More Linux Stuff
    Next Article Automating verification of text file contents format?

    Related Posts

    News & Updates

    I test AI tools for a living. Here are 3 image generators I actually use and how

    June 4, 2025
    News & Updates

    The world’s smallest 65W USB-C charger is my latest travel essential

    June 4, 2025
    Leave A Reply Cancel Reply

    Hostinger

    Continue Reading

    Snipping Tool’s Paint 3D Icon is not Working Automatically

    Development

    VanHelsing ransomware: what you need to know

    Development

    Google DeepMind CEO says “AGI is coming and I’m not sure society is ready” as the prospects keep him up at night

    News & Updates

    The Impact Dark Mode Has on User Experience

    Web Development

    Highlights

    Development

    Google Reports 75 Zero-Days Exploited in 2024 — 44% Targeted Enterprise Security Products

    May 8, 2025

    Google has revealed that it observed 75 zero-day vulnerabilities exploited in the wild in 2024,…

    Up and running with Apache OFBiz and Amazon Aurora DSQL

    March 26, 2025

    AI-friendly Surface Laptop 7 lets you adjust right-click region on your touchpad

    June 19, 2024

    CVE-2025-47424 – Retool Host Header Injection Vulnerability

    May 9, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.