News

YAML and Remote Code Execution

Author: Craig Stuntz YAML’s security risks are in no way limited to Rails or Ruby. YAML documents should be treated as executable code and firewalled accordingly. Deserializing arbitrary types is user-controlled, arbitrary code execution. It’s Not Just Ruby A few weeks ago, I had a need to parse Jasmine’s jasmine.yml in some C# code. I spent some time looking at existing YAML…
Read more
News

Installing Sonar for Delphi

Author: Miguel Angel Oliver On15th of November the HTML5 Builder QA Team was in the VLCTesting where welearned very good experiences and shared knowledge, amongst this was the software Sonar,Right now in HTML5 Builder we are not using that tool but we…
News

Why Won't Visual Studio Step Into This Code?

Author: Craig Stuntz I helped another developer debug an interesting problem this morning. Let’s see if you can spot the problem. The code in question looked something like this simplified version containing only enough code to show the problem: public void Execute() { DoStuff(); // breakpoint 1 } public IEnumerable<Coordinate> DoStuff() { …
Read more
News

In LINQ, Don't Use Count() When You Mean Any()

Author: Craig Stuntz If you have a list, array, or query in a C#/LINQ application and need to check and see if the list is empty, the correct way to do this is to use the Any() extension method: if (q.Any()) { Similarly, you can check to see if any elements in the list…
News

A Math Primer for Gentry's Fully Homomorphic Encryption

Author: Craig Stuntz A couple of weeks ago, I wrote What Is Homomorphic Encryption, and Why Should I Care? In that post, I promised to share my C# implementation of the algorithm from Craig Gentry’s CACM article. Before I can do that, though, I need to explain some of the math involved. Perhaps surprisingly, it’s actually very simple. (I say “surprisingly” because much of…
Read more
News

jqGrid and XSS Security

Author: Craig Stuntz Version 3.5.2 of jqGrid included an important new feature: Now when autoencode is set to true we encode the data coming from server and not only when we post it (secutity fix) Prior to this, you were required to encode the data yourself. Now personally…
News

Entity Framework Models and Source Control

Author: Craig Stuntz As you’re probably aware, an Entity Framework model is stored in a single XML file, with the extension EDMX. Developers occasionally ask if this means that two people cannot work on the entity model concurrently. My answer to this is, “It depends.” But I can give you some tips to make it easier. Obviously, if you use a source control tool which locks files on…
Read more