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

      CodeSOD: A Unique Way to Primary Key

      July 22, 2025

      BrowserStack launches Figma plugin for detecting accessibility issues in design phase

      July 22, 2025

      Parasoft brings agentic AI to service virtualization in latest release

      July 22, 2025

      Node.js vs. Python for Backend: 7 Reasons C-Level Leaders Choose Node.js Talent

      July 21, 2025

      The best CRM software with email marketing in 2025: Expert tested and reviewed

      July 22, 2025

      This multi-port car charger can power 4 gadgets at once – and it’s surprisingly cheap

      July 22, 2025

      I’m a wearables editor and here are the 7 Pixel Watch 4 rumors I’m most curious about

      July 22, 2025

      8 ways I quickly leveled up my Linux skills – and you can too

      July 22, 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

      The Intersection of Agile and Accessibility – A Series on Designing for Everyone

      July 22, 2025
      Recent

      The Intersection of Agile and Accessibility – A Series on Designing for Everyone

      July 22, 2025

      Zero Trust & Cybersecurity Mesh: Your Org’s Survival Guide

      July 22, 2025

      Execute Ping Commands and Get Back Structured Data in PHP

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

      A Tomb Raider composer has been jailed — His legacy overshadowed by $75k+ in loan fraud

      July 22, 2025
      Recent

      A Tomb Raider composer has been jailed — His legacy overshadowed by $75k+ in loan fraud

      July 22, 2025

      “I don’t think I changed his mind” — NVIDIA CEO comments on H20 AI GPU sales resuming in China following a meeting with President Trump

      July 22, 2025

      Galaxy Z Fold 7 review: Six years later — Samsung finally cracks the foldable code

      July 22, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»News & Updates»CodeSOD: The Variable Toggle

    CodeSOD: The Variable Toggle

    April 21, 2025

    A common class of bad code is the code which mixes server side code with client side code. This kind of thing:

    <script>
        <?php if (someVal) { ?>
            var foo = <? echo someOtherVal ?>;
        <?php } else { ?>
            var foo = 5;
        <?php } ?>
    </script>
    

    We’ve seen it, we hate it, and is there really anything new to say about it?

    Well, today’s anonymous submitter found an “interesting” take on the pattern.

    <script>
        if(linkfromwhere_srfid=='vff')
          {
        <?php
        $vff = 1;
        ?>
          }
    </script>
    

    Here, they have a client-side conditional, and based on that conditional, they attempt to set a variable on the server side. This does not work. This cannot work: the PHP code executes on the server, the client code executes on the client, and you need to be a lot more thoughtful about how they interact than this.

    And yet, the developer responsible has done this all over the code base, pushed the non-working code out to production, and when it doesn’t work, just adds bug tickets to the backlog to eventually figure out why- tickets that never get picked up, because there’s always something with a higher priority out there.

    [Advertisement]
    Keep all your packages and Docker containers in one place, scan for vulnerabilities, and control who can access different feeds. ProGet installs in minutes and has a powerful free version with a lot of great features that you can upgrade when ready.Learn more.

    Source: Read More 

    Facebook Twitter Reddit Email Copy Link
    Previous ArticleZentyal Server is a unified network server Linux distribution
    Next Article CVE-2025-0632 – Formulatrix Rock Maker Web Local File Inclusion Vulnerability

    Related Posts

    News & Updates

    The best CRM software with email marketing in 2025: Expert tested and reviewed

    July 22, 2025
    News & Updates

    This multi-port car charger can power 4 gadgets at once – and it’s surprisingly cheap

    July 22, 2025
    Leave A Reply Cancel Reply

    For security, use of Google's reCAPTCHA service is required which is subject to the Google Privacy Policy and Terms of Use.

    Continue Reading

    Arolyn Burns

    Web Development

    PerfektBlue Bluetooth leads to RCE

    Security

    CVE-2025-35004 – Microhard BulletLTE-NA2 and IPn4Gii-NA2 Command Injection Vulnerability

    Common Vulnerabilities and Exposures (CVEs)

    On-premise structured extraction with LLM using Ollama

    Web Development

    Highlights

    CVE-2025-48133 – Uncanny Owl Uncanny Automator Missing Authorization Vulnerability

    June 5, 2025

    CVE ID : CVE-2025-48133

    Published : June 5, 2025, 9:15 p.m. | 52 minutes ago

    Description : Missing Authorization vulnerability in Uncanny Owl Uncanny Automator allows Exploiting Incorrectly Configured Access Control Security Levels.This issue affects Uncanny Automator: from n/a through 6.4.0.2.

    Severity: 6.5 | MEDIUM

    Visit the link for more details, such as CVSS details, affected products, timeline, and more…

    CVE-2025-6902 – Code-projects Inventory Management System SQL Injection Vulnerability

    June 30, 2025

    Avoid these common platform engineering mistakes

    July 3, 2025

    SAP NetWeaver 0-day Vulnerability Exploited in the Wild to Deploy Webshells

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

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