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

      The AI productivity paradox in software engineering: Balancing efficiency and human skill retention

      July 2, 2025

      The impact of gray work on software development

      July 2, 2025

      CSS Intelligence: Speculating On The Future Of A Smarter Language

      July 2, 2025

      Hallucinated code, real threat: How slopsquatting targets AI-assisted development

      July 1, 2025

      Xbox is cancelling Rare’s ‘Everwild’ and ZeniMax’s new MMORPG IP as part of broader cuts — with ‘Perfect Dark’ impacted as well

      July 2, 2025

      Microsoft is closing down Xbox studio The Initiative, with Perfect Dark killed as well — joining Everwild and ZeniMax’s new IP, and other unannounced projects

      July 2, 2025

      No, Microsoft and Xbox’s Phil Spencer isn’t stepping down any time soon — here’s the truth

      July 2, 2025

      Everwild’s cancellation has me worried for one of my favorite dev teams and Xbox itself — It needs creative new games to thrive and refresh its identity

      July 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

      Trust but Verify: The Curious Case of AI Hallucinations

      July 2, 2025
      Recent

      Trust but Verify: The Curious Case of AI Hallucinations

      July 2, 2025

      From Flow to Fabric: Connecting Power Automate to Microsoft Fabric

      July 2, 2025

      Flutter Web Hot Reload Has Landed – No More Refreshes!

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

      Xbox is cancelling Rare’s ‘Everwild’ and ZeniMax’s new MMORPG IP as part of broader cuts — with ‘Perfect Dark’ impacted as well

      July 2, 2025
      Recent

      Xbox is cancelling Rare’s ‘Everwild’ and ZeniMax’s new MMORPG IP as part of broader cuts — with ‘Perfect Dark’ impacted as well

      July 2, 2025

      Microsoft is closing down Xbox studio The Initiative, with Perfect Dark killed as well — joining Everwild and ZeniMax’s new IP, and other unannounced projects

      July 2, 2025

      No, Microsoft and Xbox’s Phil Spencer isn’t stepping down any time soon — here’s the truth

      July 2, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»News & Updates»CodeSOD: And Config

    CodeSOD: And Config

    July 2, 2025

    It’s not unusual to store format templates in your application configuration files. I’d argue it’s probably a good and wise thing to do. But Phillip inherited a C# application from a developer woh “abandoned” it, and there were some choices in there.

    <appSettings>
            <add key="xxxurl" value="[http://{1}:7777/pls/xxx/p_pristjek?i_type=MK3000{0}i_ean={3}{0}i_style=http://{2}/Content/{0}i_red=http://{2}/start.aspx/]http://{1}:7777/pls/xxx/p_pristjek?i_type=MK3000{0}i_ean={3}{0}i_style=http://{2}/Content/{0}i_red=http://{2}/start.aspx"/>
    </appSettings>
    

    Okay, I understand that this field contains URLs, but I don’t understand much else about what’s going on here. It’s unreadable, but also, it has some URLs grouped inside of a [] pair, but others which aren’t, and why oh why does the {0} sigil keep showing up so much?

    Maybe it’ll make more sense after we fill in the template?

    var url = string.Format(xxxUrl, "&", xxxIp, srvUrl, productCode);
    

    Oh. It’s an “&”. Because we’re constructing a URL query string, which also seems to contain URLs, which I suspect is going to have some escaping issues, but it’s for a query string.

    At first, I was wondering why they did this, but then I realized: they were avoiding escape characters. By making the ampersand a formatting parameter, they could avoid the need to write &amp; everywhere. Which… I guess this is a solution?

    Not a good solution, but… a solution.

    I still don’t know why the same URL is stored twice in the string, once surrounded by square brackets and once not, and I don’t think I want to know. Only bad things can result from knowing that.

    [Advertisement] Plan Your .NET 9 Migration with Confidence
    Your journey to .NET 9 is more than just one decision.Avoid migration migraines with the advice in this free guide. Download Free Guide Now!

    Source: Read More 

    Facebook Twitter Reddit Email Copy Link
    Previous ArticlePilz IndustrialPI 4 Alert: Critical Flaws (CVE-2025-41656 CVSS 10.0 RCE, CVE-2025-41648 Auth Bypass) Expose Industrial PCs
    Next Article CutePeaks – cross platform Sanger Trace file viewer

    Related Posts

    News & Updates

    Xbox is cancelling Rare’s ‘Everwild’ and ZeniMax’s new MMORPG IP as part of broader cuts — with ‘Perfect Dark’ impacted as well

    July 2, 2025
    News & Updates

    Microsoft is closing down Xbox studio The Initiative, with Perfect Dark killed as well — joining Everwild and ZeniMax’s new IP, and other unannounced projects

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

    My 6 favorite open-source Android apps from the Google Play store – and why that matters

    News & Updates

    CVE-2025-4208 – NEX-Forms PHP Code Execution Vulnerability

    Common Vulnerabilities and Exposures (CVEs)

    Mandiant: kwetsbaarheden in vpn-software vaakst aangevallen vorig jaar

    Security

    Building a REACT-Style Agent Using Fireworks AI with LangChain that Fetches Data, Generates BigQuery SQL, and Maintains Conversational Memory

    Machine Learning

    Highlights

    CVE-2025-4318 Critical RCE in AWS Amplify Codegen UI

    June 6, 2025

    CVE-2025-4318 Critical RCE in AWS Amplify Codegen UI

    CVE-2025-4318 is a critical remote code execution (RCE) vulnerability identified in the @aws-amplify/codegen-ui NPM package—a core component used by AWS Amplify Studio for generating UI components bas …
    Read more

    Published Date:
    Jun 06, 2025 (3 hours, 44 minutes ago)

    Vulnerabilities has been mentioned in this article.

    CVE-2025-20286

    CVE-2025-4318

    This Samsung tablet is the best iPad Air alternative for Android users I’ve found

    April 23, 2025

    CVE-2025-5004 – “Projectworlds Online Time Table Generator SQL Injection Vulnerability”

    May 20, 2025

    CVE-2025-5318 – Libssh SFTP Out-of-Bounds Read Vulnerability

    June 24, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

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