Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG  Not logged in ELOG logo
icon5.gif   edit templates from config page, posted by Stefano Lacaprara on Thu Jun 14 13:12:02 2018 
    icon2.gif   Re: edit templates from config page, posted by Stefan Ritt on Thu Jun 14 13:20:26 2018 
    icon2.gif   Re: edit templates from config page, posted by Andreas Luedeke on Thu Jun 14 18:17:07 2018 
       icon2.gif   Re: edit templates from config page, posted by Stefan Ritt on Thu Jun 14 19:17:41 2018 
Message ID: 68827     Entry time: Thu Jun 14 18:17:07 2018     In reply to: 68824     Reply to this: 68828
Icon: Reply  Author: Andreas Luedeke  Author Email: andreas.luedeke@psi.ch 
Category: Question  OS: Linux  ELOG Version: 3.1.3 
Subject: Re: edit templates from config page 
> Dear all,
>   I have some logbook which uses preset text depending on some option values, and uses text files for this.
> 
> something similar to:
> 
> Options Type = Start of shift{1}, 2h{2}, 4h{3}, 6h{4}, End of shift {5}
> 
> {1} Preset text = MCProdStart.txt
> {2} Preset text = MCProd2h.txt
> {3} Preset text = MCProd4h.txt
> {4} Preset text = MCProd6h.txt
> {5} Preset text = MCProdEnd.txt
> 
> I wonder if there is a way to change/edit the text files from the web interface if you are admin of that logbook, or if the only way is to change the files directly in the elog server.
> 
> thanks Stefano

Hi Stefano,

it is not directly foreseen in the web functionality of ELOG, but it can be done like this:

You could have a second logbook that has the content of these files each in one logbook entry. 
You call a script "Execute edit =" that runs on the server and converts the specific ELOG entry into a file on the server.
Of course this is a security vulnerability, but you can confine the possibilities of the script.
E.g. to a hard-coded list of ELOG entries and files in a specific directory.
Still, someone could place a file on the server and then calls that file with an "Execute edit=" himself.
But if you do all this within a protected network that should be okay.

I do like the idea, thank you for the question! If you manage to do it please post it under Contributions :-)

Cheers, Andreas
ELOG V3.1.5-fe60aaf