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

      Sunshine And March Vibes (2025 Wallpapers Edition)

      June 2, 2025

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

      June 2, 2025

      How To Fix Largest Contentful Paint Issues With Subpart Analysis

      June 2, 2025

      How To Prevent WordPress SQL Injection Attacks

      June 2, 2025

      How Red Hat just quietly, radically transformed enterprise server Linux

      June 2, 2025

      OpenAI wants ChatGPT to be your ‘super assistant’ – what that means

      June 2, 2025

      The best Linux VPNs of 2025: Expert tested and reviewed

      June 2, 2025

      One of my favorite gaming PCs is 60% off right now

      June 2, 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

      `document.currentScript` is more useful than I thought.

      June 2, 2025
      Recent

      `document.currentScript` is more useful than I thought.

      June 2, 2025

      Adobe Sensei and GenAI in Practice for Enterprise CMS

      June 2, 2025

      Over The Air Updates for React Native Apps

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

      You can now open ChatGPT on Windows 11 with Win+C (if you change the Settings)

      June 2, 2025
      Recent

      You can now open ChatGPT on Windows 11 with Win+C (if you change the Settings)

      June 2, 2025

      Microsoft says Copilot can use location to change Outlook’s UI on Android

      June 2, 2025

      TempoMail — Command Line Temporary Email in Linux

      June 2, 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.

    Hostinger

    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

    How Red Hat just quietly, radically transformed enterprise server Linux

    June 2, 2025
    News & Updates

    OpenAI wants ChatGPT to be your ‘super assistant’ – what that means

    June 2, 2025
    Leave A Reply Cancel Reply

    Continue Reading

    CVE-2025-2776 – SysAid XXE Vulnerability

    Common Vulnerabilities and Exposures (CVEs)

    The best AI health apps in 2025: Smart tools for better wellbeing

    Artificial Intelligence

    Understanding the faulty proteins linked to cancer and autism

    Artificial Intelligence

    This Week in Laravel: NativePHP for Mobile, Cursor Tips and Stress Testing

    Development
    Hostinger

    Highlights

    Development

    7 Ways META Governments Are Boosting Cybersecurity

    June 2, 2024

    The 2024 cybersecurity landscape is witnessing one of the most phenomenal transformations in the META…

    CVE-2025-43859: Request Smuggling Vulnerability in Python’s h11 HTTP Library

    April 27, 2025

    Elden Ring DLC: ‘Somewhere, a great rune has broken’ meaning in Shadow of the Erdtree

    June 23, 2024

    CVE-2024-12273 – CalculatedRoute Form WordPress Stored Cross-Site Scripting

    April 29, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

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