Duncan’s blog

April 18, 2009

The worst thing in the world

Filed under: Politics — duncan @ 2:58 pm

I don’t know what your opinion is of torture, but personally I’m against it. The US Government has published some secret memos detailing the legal justification for their torture enhanced interrogation techniques used by the CIA in the ‘war on terror‘. Mostly these are just self-serving legalistic jargon explaining why the end justifies the means.

The techniques range from relatively mild (slaps to the face or abdomen, shoving captives against a wall) to the extreme (sleep deprivation, prolonged stress positions, water boarding).

The first of these memos (PDF) has the following section:

In addition to using the confinement boxes alone, you also would like to introduce an insect into one of the boxes with Zubaydah. As we understand it, you plan to inform Zubaydah that you are going to place a stinging insect into the box, but you will actually place a harmless insect in the box, such as a caterpillar. If you do so, to ensure that you are outside the predicate act requirement, you must inform him that the insects will not have a sting that would produce death or severe pain. If, however, you were to place the insect in the box without informing him that you are doing so, then, in order to not commit a predicate act, you should not affirmatively lead him to believe that any insect is present which has a sting that could produce severe pain or suffering or even cause his death. [censored] so long as you take either of the approaches we have described, the insect’s placement in the box would not constitute a threat of severe physical pain or suffering to a reasonable person in his position. An individual placed in a box, even an individual with a fear of insects, would not reasonably feel threatened with severe physical pain or suffering if a caterpillar was placed in the box.

Does that remind you of anything? The following excerpts are from George Orwell’s Nineteen Eighty-Four:

‘The worst thing in the world,’ said O’Brien, ‘varies from individual to individual. It may be burial alive, or death by fire, or by drowning, or by impalement, or fifty other deaths. There are cases where it is some quite trivial thing, not even fatal.’

‘In your case,’ said O’Brien, ‘the worst thing in the world happens to be rats.’

‘By itself,’ he said, ‘pain is not always enough. There are occasions when a human being will stand out against pain, even to the point of death. But for everyone there is something unendurable–something that cannot be contemplated. Courage and cowardice are not involved. If you are falling from a height it is not cowardly to clutch at a rope. If you have come up from deep water it is not cowardly to fill your lungs with air. It is merely an instinct which cannot be destroyed. It is the same with the rats. For you, they are unendurable. They are a form of pressure that you cannot withstand, even if you wished to. You will do what is required of you.’

April 15, 2009

CFSchedule bug

Filed under: Coldfusion — duncan @ 8:06 pm
Tags: , , , , ,

In a follow-up to yesterday’s post about a bug with scheduled tasks in ColdFusion Administrator, I decided to see if the same bug existed if you used the <cfschedule> tag.

And I can confirm it does, at least on Adobe ColdFusion 8 developer edition.

This code replicates it. Setting a one-time only scheduled task with a start date/time in the past. The task runs immediately.

<cfschedule
	action="UPDATE"
	task="TestTask"
	operation="HTTPRequest"
	startDate="#CreateDate(2009, 04, 01)#"
	startTime="21:00"
	url="http://127.0.0.1:8500/TestTask.cfm"
	interval="once">

And similar to the problem with scheduled tasks in CF Administrator; if you create a one-time scheduled task to run in the future, then update it to be in the past, it will run immediately.

I’ve reported this as a separate bug.

April 14, 2009

ColdFusion scheduled task bug

I just discovered this bug with scheduled tasks in ColdFusion Administrator today. I think I’ve encountered it before but didn’t realise at the time what had happened.

I was updating a scheduled task to run in the future. I then decided to just run it manually instead. To make sure the scheduled task didn’t run as I’d originally planned, I just put the date into the past. I didn’t want to delete the scheduled task as it’s one that is run occasionally as and when required.
ColdFusion Administrator scheduled task screen

What I found was that when I edited the scheduled task to be in the past, it actually ran immediately! If you edit it again to another date in the past, it’ll run again. Luckily the scheduled task I was working on wasn’t that important, but some scheduled tasks (especially one-off ones) might have more serious consequences if they run when you’re not expecting it.

I found two ways to replicate this bug.
Method 1:

  1. Create a new scheduled task in CF Administrator.
  2. Set it to run one time with a date in the past, say yesterday at 9pm.
  3. Save the scheduled task.

Method 2:

  1. Create a new scheduled task in CF Administrator.
  2. Set it to run one time with a date in the future, say tomorrow at 9pm.
  3. Save the scheduled task.
  4. Edit the scheduled task, and change the date or time to the past, say 9pm yesterday.

So basically any time you create or update a scheduled task, running ‘One-Time’ but with a date/time in the past, it’ll run immediately!

I noticed this bug in Adobe ColdFusion 7 and 8 Enterprise, and ColdFusion 8 Developer edition. I’d be surprised if it happens in Railo or OpenBlueDragon. Bug reported at Adobe’s Bug Report Form.

Blog at WordPress.com.