Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG  Not logged in ELOG logo
icon2.gif   Post using html form --> not solved ... , posted by Hayg Guler on Wed Jan 4 11:00:01 2023 
    icon2.gif   Re: Post using html form --> not solved ... , posted by Stefan Ritt on Wed Jan 4 12:38:07 2023 
Message ID: 69612     Entry time: Wed Jan 4 12:38:07 2023     In reply to: 69603
Icon: Reply  Author: Stefan Ritt  Author Email: stefan.ritt@psi.ch 
Category: Question  OS: Linux  ELOG Version: 3.1.4-395e101 
Subject: Re: Post using html form --> not solved ...  

When you log in manually to a logbook, a session ID is created and stored in a cookie "sid". On your shift check list you need some code to copy this session ID into your current form. In the code form 2010, I used "unm" and "upwd", but this was removed since it's not safe. So now you need somethign like:

<input type="hidden" name="sid" id="sid">

and

document.getElementById('sid').value = get_cookie('sid');

in your init code.

I haven't tried that in the past 12 years so no guarantee that it should work.

Stefan

 

Hayg Guler wrote:

Dear All,

Just want to come back to this issue I faced.

In the config file, I call an html form to format input. The way I call the html file inside my config file is described below.

My point is, even if I am already logged in, each time I try to submit an html form, it sais I am not logged in ...

please refer to the corresponding form to see the screenshots.

 

Many thanks

Hayg

 

 

------->

 

that is strange since I logged in ... 

It seems like when I go in the shift check topic in the elog, it does not get my login id ... is there something coming from the HTML file that should be set in order to get the login from elog ?

see in the attached image : I am logged in but I still need to feed the Author item. And even If I fill it, 

And then if I Click on new to write a new filling form, author is not filled as you could see on the second image "Author ?"  ...

so I don' see from where appears the problem

 

Stefan Ritt wrote:

Probably people have to log in to the logbook before opening the form. I guess the "submit not allowed" comes from the fact that they access the logbook as a guest.

Stefan

Hayg Guler wrote:

Dear All,

we are trying to post from an HTML form, as included in our config file :

 

[ShiftCheck]
Comment = Shift Check List (exemple a modifier)
Attributes = Author, D, M, Y, Shift, LasE, LasIris, Q, E, Li, TL, RI
Quick filter = Shift, Author
Options Shift = Morning, Evening, Night

Enable attachments = 0
Show text = 1
Custom new form = /www/Web/htdocs/elog/sites/THOMX/shiftcheck.html
Custom edit form =  /www/Web/htdocs/elog/sites/THOMX/shiftcheck.html
Custom display form =  /www/Web/htdocs/elog/sites/THOMX/shiftcheck.html

 

we are facing the following problem when trying to submit :

--> Error: Command "Submit" not allowed

 

is there something missing in our config file ?

 

Many thanks in advance

 

 

 

ELOG V3.1.5-fe60aaf