Subscribe: Pete Freitag's Homepage
Added By: Feedage Forager Feedage Grade B rated
Language: English
application  cfml  code  coldfusion  conference  filter  friends  fuseguard  java  jep  new  script  security  user friends  user 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: Pete Freitag's Homepage

Pete Freitag's Homepage

Covering ColdFusion, Java, Web Development, and other topics

Last Build Date: Thu, 05 Apr 2018 22:09:00 GMT


Facebook API Now Requires Review for user_friends Permission

Thu, 05 Apr 2018 22:09:00 GMT

Looking at the Facebook Developer API documentation yesterday, I noticed a subtle change in the permissions that they give to developers without review on the graph API. Somewhere between March 21 and March 28th 2018 they removed unreviewed access to the user_friends permission. I doesn't take much to put together that this change is probably due to the impact of the Cambridge Analytica saga they are dealing with.

When you go here: it currently states:

Basic permissions, (public_profile and email) do not require Review, but all other permissions do.

Because that was different than what I recalled, I used the way back machine to check if they had made a change, and sure enough on March 21, 2018 it read:

Basic permissions, (public_profile, user_friends, and email) do not require Review, but all other permissions do.

The user_friends permission does not mean that you have access to the info about all friends of a user in your application, it is limited to only those users who have also logged in with the same app and mutually granted the user_friends permission to the application. That limitation of mutual app access was added back in 2014 or 2015, it was not there when Facebook first released their API, which is what companies like Cambridge Analytica were able to use to get data on millions of people.

It appears that apps that were registered before this change will keep their user_friends permissions, this is just a change that applies to new apps being created. This is similar to how Facebook handled that change in what friends are avaliable - older apps were apparently allowed to keep accessing all friends (not just mutual app user friends) after the changed the rules.

Docker Container exited with code 137

Fri, 19 Jan 2018 01:31:00 GMT

When attempting to fire up a bunch of docker containers using docker-compose on a Mac, one of the containers was randomly exiting with the exit code 137. The message would look something like this:

container_name exited with code 137

My first reaction was to try to quickly run docker exec -it container-id /bin/bash and then take a look at the logs, but before I was quick enough to do that I decided to look into exit code 137.

As it turns out this code is commonly associated with Docker for Mac not having enough RAM allocated to it. More specifically the Linux OOM (out of memory) Killer, kicked in and terminated the process.

So it is an easy fix, go to the Docker Menu and select Preferences then the Advanced tab and increase the Memory.


My docker memory was set to 2.0 GB (perhaps the default), I increased it to 4.0 GB and problem solved.

You may also be able to get around this problem by setting the --memory limit when starting a container, or if you are using docker compose, you can do something like this in your docker-compose.yml file:

version: '3'
    image: image-name:tag
          memory: 50M
          memory: 20M

Why is my cron.daily script not running?

Wed, 10 Jan 2018 20:34:00 GMT

Over the years when setting up servers I have run into the various ways that your cron.daily or cron.hourly scripts manage to fail to run. Today I ran into a new reason which I don't recall running into before, maybe something has changed or maybe I just never ran into it.

I ran into the problem on a Ubuntu 16.04 LTS server - I placed a script in /etc/cron.daily/ but it was not running.

I checked all the usual suspects, the reasons I was aware of that cause a cron script to be ignored:

  • The script must have the x permission
  • The script did not depend on certain environment variables being set (for example if you rely on $HOME to be set, you may need to define it yourself). Cron scripts do not have all the same environment variables that you have when you are logged in to a shell, so the script can work when you run it but fail when cron runs it.
  • The script did not rely on a customized PATH to execute commands. The PATH that cron gives your script will be minimal, and if you have made customizations to it they may not show up. The best way around this is to use the full path to your commands (use the which command to help figure this out).

But my problem was not any of the above. I found that you can execute the run-parts command in a test mode to see which scripts it would call in a directory. You can run it like this (it will not execute any of the scripts, it just outputs which ones it would execute):

run-parts --test /etc/cron.daily

My script was not listed in the output! Well, that was comforting at least but why was it not listed? It turns out you cannot have a file extension on the script, so by renaming the script from to my_script it works!

Announcing FuseGuard Version 3

Thu, 30 Nov 2017 23:47:00 GMT

After many hours in development and testing we are proud to announce the release of FuseGuard 3! FuseGuard 3 ships with 11 new filters, 1 new logger and several additional improvements to better protect your CFML applications. With FuseGuard 3 we've tweaked and improved the protections that were included in version 2, and have added new methods identifying malicious requests. The result is that more malicious requests to your applications can be detected, blocked, and logged with FuseGuard 3. What is FuseGuard? If you are not familiar with FuseGuard, it is a web application firewall written in CFML. It runs onRequestStart to block or log malicious requests made to your application. If configured to, FuseGuard will block the malicious request before it hits your application code. It can also log these events. What's New in FuseGuard 3? Configuring FuseGuard is now much easier as FuseGuard 3 can be fully configured from within the FuseGuard Manager web admin. That means you can add filters, edit filter settings, and do it all from the web UI. If you want to keep using the CFC based configuration you used in FuseGuard 2 that is also still fully supported. Configure Filters in FuseGuard Manager There are 11 new filters in FuseGuard 3: Geographical Filter - Does your application only serve users in a specific geographic region? FuseGuard 3 makes it easy to connect IP country data to whitelist or blacklist IP addresses based upon country. Remote Execution Filter - this new filter looks for several patterns used to exploit CFML specific remote code execution vulnerabilities. XML Entity Injection Filter - looks for xml entity injection patterns. Shell Execution Filter - looks for common shell execution patterns and paths. Remote Method Filter - block remote CFC method calls or SOAP requests. HoneyPot Filter - Uses project honeypot data to block malicious IP addresses. XML External DTD Filter - looks for xml external DTD patterns. User Agent Filter - looks for malicious or malformed user agents. IP BlackList Filter - easily black list IPs using the IP List managers IP WhiteList Filter - create IP whitelists easily. File Upload Content Filter - inspects file upload contents for executable CFML experimental. Those filters listed above are just the new filters in FuseGuard 3, the 18 filters which were part of FuseGuard 2 are also included which look for things like SQL Injection, Cross Site Scripting, Path Traversals, Malicious File Uploads, Null Byte Injection and more. The FuseGuard manager UI has been updated and improved in this version, here are a few screenshots: Updated FuseGuard Manager UI New Subscription Pricing We are now offering FuseGuard with subscription pricing for an annual term. A one year subscription allows you to always have access to the latest version of FuseGuard. Server License Subscription - $48/month per server Enterprise License Subscription - $450/month [...]

CFSummit 2017

Tue, 28 Nov 2017 00:09:00 GMT

It was another great ColdFusion Summit event in Las Vegas this year. My company Foundeo Inc. was a sponsor again this year. It was great to meet so many new people this year. During the keynote Tridib Roy Chowdhury asked for a show of hands as to how many people were attending for the first time. It was impossible to count, but to me it looked like about half the room were first time attendees. That was great to see.

This year I did another full day training on Writing Secure CFML for the pre-conference. It was sold out at 50 seats and was a lot of fun to present. The demo code for that session can be found here: I don't publish the slides for this topic because I offer this CFML security training commercially as well.

On Thursday my company announced FuseGuard 3 which is a new update to our web application firewall product for CFML. I will post a blog entry with more details on that later this week.

Finally on Friday I presented on Securing Mature CFML Code Bases (slides, code).

Looking forward to another CFSummit in 2018.

Java Unlimited Strength Crypto Policy for Java 9 or 1.8.0_151

Thu, 19 Oct 2017 21:27:00 GMT

Starting with Java 1.8.0_151 and 1.8.0_152 there is a new somewhat easier way to enable the unlimited strength jurisdiction policy for the JVM. Without enabling this you cannot use AES-256 for example.

First download the JRE, I like to use the server-jre for servers. When you extract the server-jre look for the file in the jre/lib/security folder. For example for Java 1.8.0_152 the file structure looks like this:

   |- /jre
        |- /lib
              |- /security

Now open with a text editor and look for the line that defines the java security property crypto.policy it can have two values limited or unlimited - the default is limited.

By default you should find a commented out line:


You can enable unlimited by uncommenting that line, remove the #:


Now restart your java applications that point to the JVM and you should be all set.

Java 9 Security Enhancements

Thu, 21 Sep 2017 22:33:00 GMT

With the General Availability release of Java 9 scheduled for today, I thought it would be appropriate to go over the new features that pertain to security.

Implement HTTP/2 Client
Implementation of a HTTP/2 Client in the standard java SDK. JEP 110

SHA-3 Hash Algorithms
Implements the SHA-3 cryptographic hash functions defined by NIST FIPS 202: SHA3-224, SHA3-256, SHA3-384, and SHA3-512. JEP 287

Improve Secure Application Performance
Improves performance of applications that run with a SecurityManager enabled. JEP 232

Disable SHA-1 Certificates
Allows you to disable X.509 certificate chains with SHA-1 based signatures (eg TLS / HTTPS). JEP 288

TLS Application-Layer Protocol Negotiation Extension (ALPN)
Implements the ALPN TLS extension, needed for HTTP/2. JEP 244

Create PKCS12 Keystores by Default
Instead of the proprietary JKS format, use standard PKCS12 format. JEP 229

OCSP Stapling for TLS
Implements OCSP stapling via TLS Certificate Status Request Extension and Multiple Certificate Status Request Extension. JEP 249

Leverage CPU Instructions for GHASH and RSA
Improves performance by leveraging CPU instructions. JEP 246

DRBG-Based SecureRandom Implementations
Implements Deterministic Random Bit Generator defined in NIST 800-90Ar1. JEP 273

Filter incoming serialization data
Allows filtering of incoming streams of object-serialization data. JEP 290

Datagram Transport Layer Security (DTLS) API
Defines an API for working with DTLS (RFC 4347). JEP 219

Overall some nice security improvements to look forward to.

Upcoming CFML Conferences in April 2017

Tue, 04 Apr 2017 22:14:00 GMT

I will be speaking at two conferences this month.

The conference is the Adobe CFSummit East also known as the Adobe ColdFusion Government Summit. It will be held on April 18-19, 2017 in Washington DC. The first day is two half day hands on sessions, I will be presenting the first session which is a CFML security training class (sold out). On day two I will be presenting a 1hr session: Bulletproof Your Adobe ColdFusion Server with the Lockdown Guide.

This conference is free to attend, so if you are on the east cost it may be worth it to consider attending. Other speakers besides myself include: Rakshith Naresh, Giancarlo Gomez, Matt Hintze, Elishia Dvorak, Charlie Arehart, Dan Wilson, Nolan Erck, Masha Edelen, and Dan Fredericks. The opening keynote will be given by Tridib Roy Chowdhury & Steve Drucker. My company Foundeo Inc. is a sponsor of the event.

The following week is the Into the Box Conference. This conferences is loaded with tons of great speakers and should be a really good place to learn the latest techniques for modern CFML development. While the conference organized on by the makers of the ColdBox framework, you don't need to use ColdBox to get a lot out of this conference. Many of the tools in the Box ecosystem can be utilized on their own and can provide great benefits to developers. Take for example CommandBox, if you are not using this tool spend 5 minutes looking into it right now and find out why you should be.

At Into the Box I will be speaking on Securing CFML Codebases, a look at techniques to improve the security of your existing CFML codebase.

CFSummit 2016 Slides

Tue, 18 Oct 2016 01:02:00 GMT

Here are my slides from the Adobe ColdFusion Summit 2016 conference in Las Vegas:

The conference appeared to be a great success with about 500 people in attendance. My company Foundeo Inc. was a Gold Sponsor again this year. I met a lot of great ColdFusion developers, thanks for saying hello.

I also presented a full day pre-conference workshop on CFML Security along with Dave Epler. This session went very well and was sold out at 50 people. For this session (and other CFML security training classes I teach) I built a CFML web application called Bank of Insecurity you can find the code on github here.

Securing Legacy CFML - dev.Objective() 2016 Slides

Mon, 20 Jun 2016 23:10:00 GMT

Back from another great dev.Objective() conference in Minneapollis. This year Foundeo was a sponsor, and I spoke on Securing Legacy CFML Code. Find the slides here.