Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG  Not logged in ELOG logo
Message ID: 69879     Entry time: Wed Jun 18 01:20:47 2025
Icon: Entry  Author: Harry Martin  Author Email: harrymartin772@gmail.com 
Category: Bug report  OS: Linux  ELOG Version: 3.1.5 
Subject: passing %s to $shell interpreted differently in preset vs preset on reply 

I am finding that '%s' passed to a $shell(...) command must be escaped when calling from Preset on reply, but not when calling Preset new.  Example:

[tickler]
Comment = Automated Tickler List Experiment
Attributes = Blurb, TickleDate
Type TickleDate = date
Required Attributes = Blurb
Preset TickleDate = $shell(date -d 'now + 30 days' '+%s')
Preset on reply TickleDate = $shell(date -d 'now + 30 days' '+%%s')
Date Format = %Y-%m-%d

Note that I have to escape the Preset on Reply's shell command argument with double percent signs, but not on Preset new.  The configuration I have provided here does work and correctly overrides the output per the Date Format spec.  This scenario should be easy to reproduce.

It could be I am doing something incorrectly, but it seems to me that there is no reason why the calls should need to be handled differently.  I can live with this for the moment, but I do hope it is fixed in a later release so that $shell calls have consistent syntax and semantics.

 

ELOG V3.1.5-3fb85fa6