Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 721 of 796  Not logged in ELOG logo
ID Date Icondown Author Author Email Category OS ELOG Version Subject
  69332   Wed Mar 24 22:09:56 2021 Idea Andreas Luedekeandreas.luedeke@psi.chRequestLinux | AllV3.1.4Re: Request: make $text available for "subst"

Hi Stefan,
no problem: if I just strip all newlines from the $text field (in HTML you use <br> anyway, the newline has no function apart from whitespace), and my multiline attribute is fine to go.
I do not intend to make the attribute editable: it is just used for display. Because that allows me to create the attribute either from free text or from combining other fields - depending on conditional attributes.

As a special feature you could strip all newlines beforehand, when providing the $text for subst statements.

Cheers, Andreas

Stefan Ritt wrote:

Sure, attributes can be shown multi-line, but they cannot be stored in the elog internal database. The database is a very old design and only allows for single line attributes. Just look at a YYMMDDa.log file and you will see that. I would have to change the database format to somethign more advanced like XML, but that would take me a couple of weeks or months.

Soooorrryy! ;-)

Andreas Luedeke wrote:

While the input widget of text attributes is a single line, they can easily be multi-line in the display - when you use HTML at least.
And of course the user can parse the text field and generate a single line, if he wants to.
If you leave it to me, I'll create wonderful applications to that feature :-)

Please? ;-)

Stefan Ritt wrote:

$text is the full body text and can go over many lines. Since attributes are restricted to single lines, it's not possible to substitute them with the body text.

Stefan

Andreas Luedeke wrote:

Hi Stefan,

I've just tried to read the $text with subst into another field and failed.
It looks like $text is only available for the execution of shell scripts in the "execute new|edit|delete = <script>" command.

Could that be added? I can think of a multitude of applications:

  • In my case I want to fill an attribute X either with free text or generated from other fields. The list view will show just X and not how it was generated.
  • I could fill an attribute automatically with the character length of the text.
  • I could parse the text in a shell script and set other attributes according to the content.

Thank you for considering it.

Cheers, Andreas

 

 

 

 

  69370   Mon Jun 14 17:25:02 2021 Idea Andreas Luedekeandreas.luedeke@psi.chBug reportAllV3.1.4Bug Report with CSS includes (was Re: How to format a column in list display?)

Okay, found some solution for my problem:

List Change Pikett = <div class="pikett">$Pikett</div>
CSS=pikett.css

And file themes/default/pikett.css contains:

.pikett {
  background-color:white;
  font-size:16px;
  font-family:monospace;
  text-align:left;
}

That works like a charm - until I log in to the logbook. Then the include of the CSS in the header is garbled with some "prefix" of random chars:

<link rel="stylesheet" type="text/css" href="elog.css">
<link rel="stylesheet" type="text/css" href="`=T ýpikett.css">

And a quick check in the source code shows some bad code:

L7615: function "show_html_header"

         rsprintf("<link rel=\"stylesheet\" type=\"text/css\" href=\"%s%s\">\n", css_base, css);

Here css_base is a not initialized local variable of the function. In fact the above line is the only reference of that variable char css_base[1000].

The bug is still present in elog-3.1.4-611489b

 

Andreas Luedeke wrote:
There is the nice conditional formatting feature for List display:
Cell Style <attribute> <value> = <style>
I would like to use it without conditions: some attributes should always be formatted in a specific way.
 
Specifically I want a generated attribute (combined from other attributes) to be display in monospace font.
The "Format Pikett = 0, attribname, messagelist" works nicely for the single entry display (pik1), but not for List view (pik-list).

Would it be possible to create a new command "List format <attribute> = <css_class_name>,<css_class_value>,<width>,<size>", or is there another way to achieve this?

 

  69371   Mon Jun 14 18:06:06 2021 Idea Andreas Luedekeandreas.luedeke@psi.chCommentLinux | AllV3.1.4Re: Request: make $text available for "subst"

I should tell that I found a simpler way to achieve the same:
I suppress the "text" field and use a single line text input field instead.
The single line input in "free text" modes just contains "<br>" : I would have had to use those in the text field anyway.

Andreas Luedeke wrote:

Hi Stefan,
no problem: if I just strip all newlines from the $text field (in HTML you use <br> anyway, the newline has no function apart from whitespace), and my multiline attribute is fine to go.
I do not intend to make the attribute editable: it is just used for display. Because that allows me to create the attribute either from free text or from combining other fields - depending on conditional attributes.

As a special feature you could strip all newlines beforehand, when providing the $text for subst statements.

Cheers, Andreas

Stefan Ritt wrote:

Sure, attributes can be shown multi-line, but they cannot be stored in the elog internal database. The database is a very old design and only allows for single line attributes. Just look at a YYMMDDa.log file and you will see that. I would have to change the database format to somethign more advanced like XML, but that would take me a couple of weeks or months.

Soooorrryy! ;-)

Andreas Luedeke wrote:

While the input widget of text attributes is a single line, they can easily be multi-line in the display - when you use HTML at least.
And of course the user can parse the text field and generate a single line, if he wants to.
If you leave it to me, I'll create wonderful applications to that feature :-)

Please? ;-)

Stefan Ritt wrote:

$text is the full body text and can go over many lines. Since attributes are restricted to single lines, it's not possible to substitute them with the body text.

Stefan

Andreas Luedeke wrote:

Hi Stefan,

I've just tried to read the $text with subst into another field and failed.
It looks like $text is only available for the execution of shell scripts in the "execute new|edit|delete = <script>" command.

Could that be added? I can think of a multitude of applications:

  • In my case I want to fill an attribute X either with free text or generated from other fields. The list view will show just X and not how it was generated.
  • I could fill an attribute automatically with the character length of the text.
  • I could parse the text in a shell script and set other attributes according to the content.

Thank you for considering it.

Cheers, Andreas

 

 

 

 

 

  69400   Thu Oct 21 11:15:20 2021 Idea Andreas Luedekeandreas.luedeke@psi.chRequestAll3.1.4How about string constants in config files?

My config files are often large and use some shell scripting. In these shell scripting part I interact with files and execute scripts in specific folder.
It would be nice to have the ability to define for example a file path once and reuse it in different parts of the config file. It would help to make config files cleaner. For example:

Constant c_cid = "/usr/local/elog/logbooks/elog-campaignID.default"
Execute new = if ! [ -z "$CampaignID" ] ; then echo "$CampaignID" > $c_cid; fi

Preset CampaignID = $shell( if [ -r $c_cid ] ; then cat $c_cid; else echo None > $c_cid; echo None; fi )

  69413   Mon Nov 15 15:41:04 2021 Idea Anthonyanthony.weathers@pm.meQuestionAll3.1.4Shared logbook and elog.cfg file across multiple installations

Hi,

I'm wondering if it's possible to have a shared logbook and elog.cfg between multiple instances of elog.  Ideally, I'd like to have my logbooks folder and elog.cfg hosted on a nextcloud instance while running the elog service locally.  I've tried this using symlinks and shortcuts on windows with no luck.  I was able to install elog into my mounted nextcloud folder, but this isn't ideal as I would like this to work from multiple computers.

Any ideas or thoughts on how I can do this (if I can actually do this)?

  69462   Tue Feb 1 15:39:38 2022 Idea Jan Just Keijserjanjust@nikhef.nlInfoLinux3.1.4-3Default "Author" when replying to a log entry

what is the default value for "Author" when replying to a log entry ?  I now see that for each reply to a log entry, the value of "Author" is set to the value of the author of the original entry - this makes it very hard to see which user has replied to a particular log entry, especially when users start replying to replies etc.

This is with elog 3.1.4-3 on CentOS 7

  69564   Thu Sep 29 08:52:05 2022 Idea Brandmarktbrandmarkt11@gmail.comInfoWindows1Finden Sie das beste Herrenhemd für den Büroalltag bei https://brandmarkt.ch/ in St. Gallen

Herrenhemden in St. Gallen
Titel: Finden Sie das beste Herrenhemd für den Büroalltag bei brandmarkt in St. Gallen
Wenn es darum geht, sich für die Arbeit zu kleiden, ist es am besten, eine Vielzahl von zuverlässigen Büromodellen zur Verfügung zu haben. Von allen Kleidungsstücken, die zur Auswahl stehen, sind Herrenhemden für das Büro das attraktivste Kleidungsstück für Berufstätige.
Berufstätige Männer wollen immer gut in ihre Bürokleidung investieren. Die günstigste Herren-Business-Kleidung zu kaufen, ist sehr schwierig.
Möchten Sie die originellen und stilvollen Herrenhemden für die Bürobekleidung in St. Gallen kaufen?
 Bei 9000 in St. Gallen hat Brandmarkt eine Vielzahl von Herrenhemden für die Bürobekleidung. Langärmelige Herrenhemden für den Arbeitsplatz, kurzärmelige Herrenhemden in aktuellen Modetrends sind zu günstigen Preisen erhältlich.
Berufstätige Männer wollen immer stilvoll und bequem aussehen, indem sie leichte Kleidung wie T-Shirts oder kurzärmelige Herren-Arbeitshemden tragen. Sie können ein kurzärmeliges T-Shirt mit einer Jeans oder einer Hose tragen und sind damit bei einem Meeting präsentabel.
Kleiden Sie sich im Sommer mit der bequemsten und stilvollsten Herren-Bürokleidung für das Büro. Herrenhemden für das Büro in hellen Farben sind die perfekte Kleidung für den Sommer. Herrenhemden für den Sommerlook gibt es bei Brandmarkt zu günstigen Preisen.  
Geschäftsleute wollen immer Klasse in ihrem Auftreten mit der aktuellsten Herren-Business-Mode. Meistens werden für die Bürokleidung der Herren Anzüge getragen. Passende Hemden zum Anzug sorgen für Abwechslung im Erscheinungsbild.
 
Bei Brandmarkt in St. Gallen können Sie Marken-Herrenhemden in verschiedenen Farben, Mustern und Designs zu günstigen Preisen kaufen und mit Ihrem Büroanzug kombinieren.
Viele Büros planen verschiedene Tage wie den "Causal Wear Friday" für ihre Mitarbeiter. Es ist Zeit, sich in Freizeitkleidung zu kleiden. Sie können ein Hemd oder T-Shirt mit Jeans tragen. Passende Herren-Accessoires wie Gürtel und Krawatten können Ihren Look ebenfalls aufwerten.
Holen Sie sich die exklusiven Herrenhemden bei Brandmarkt zu den günstigsten Preisen. Sie können die Top-Marken wie Ice Peak bei Brandmarkt, Jako bei Brandmarkt, Tom Taylor bei Brandmarkt, Puma bei Brandmarkt, Nike bei Brandmarkt und viele andere zu einem sehr günstigen Preis bei Brandmarkt in St. Gallen kaufen.
Nicht nur die Hemdenkollektion, sondern auch Herrenschuhe und Herrenaccessoires können Sie bei Brandmarkt in St. Gallen zu sehr günstigen Preisen kaufen.
Unternehmen veranstalten für ihre Mitarbeiter meist Sportveranstaltungen. Es ist an der Zeit, dass die Angestellten ein anderes Outfit als den Dresscode des Büros tragen. Herren-Sportbekleidung Hemden sind die beste Option für Sportveranstaltungen.
Jetzt können Sie sich für das Büro anders stylen als mit einem Anzug, einem Hemd oder einem T-Shirt. Tragen Sie ein schmal geschnittenes, langärmeliges Herren-Sporthemd mit Jogginghose und machen Sie bei Sportveranstaltungen im Büro eine gute Figur.
Für informelle Tage wünscht sich jeder Mitarbeiter einen besonderen Look. Wenn Sie auf der Suche nach Sportbekleidung, Herrenhemden in Slim Fit, Regular Fit, Herren Outdoor Hemden sind. Holen Sie sich diese im Brandmarkt in St. Gallen.
Dort gibt es exklusive Marken von Herren Sporthemden in St. Gallen zu sehr günstigen Preisen. Zu günstigen Preisen, nicht nur das Herren Sporthemd sondern auch die Marken Herren Sportschuhe zu Ihrem Outfit.
 
Wo kann man in St. Gallen günstige Herren-Bürohemden zu günstigen Preisen kaufen?
Unser Modehaus Brandmarkt an der 9000 in St. Gallen hat originelle und hochwertige Herrenhemden in St. Gallen, darunter eine große Auswahl an langärmeligen Herren-Arbeitshemden, kurzärmeligen Herren-Arbeitshemden, Slim-Fit-Hemden und Sporthemden, alles zu sehr günstigen Preisen.
 
Worauf warten Sie noch? Kommen Sie zu Brandmarkt in St. Gallen und kaufen Sie die beste Qualität an Herrenhemden in St. Gallen für Ihre Bürokleidung zu Einzelhandelspreisen. Sparen Sie Ihr Geld und sehen Sie professionell aus.

  69590   Fri Dec 2 14:44:46 2022 Idea Laurent Jean-Rigaudlollspam@free.frBug reportLinux3.14 EL7 EPELRe: custom css not loaded

Update : i tryed with last git, w/o ldap support and it seems the problem is solved with CCS URL on same machine (just replace the elogd binary from EPEL by new one just build w/o LDAP support and fallback on File to login for testing).

So my problem is the error during build with LDAP auth (since using C++) :-(

...

+ cd elog-3-14
+ make USE_SSL=1 USE_LDAP=1 USE_KRB5=1 'CFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-result -Imxml'
c++ -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-result -Imxml -DHAVE_SSL -DHAVE_KRB5 -DHAVE_LDAP -c -o mxml.o mxml/mxml.cxx
c++ -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-result -Imxml -DHAVE_SSL -DHAVE_KRB5 -DHAVE_LDAP -w -c -o crypt.o src/crypt.cxx
c++ -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-result -Imxml -DHAVE_SSL -DHAVE_KRB5 -DHAVE_LDAP -c -o strlcpy.o mxml/strlcpy.cxx
c++ -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-result -Imxml -DHAVE_SSL -DHAVE_KRB5 -DHAVE_LDAP -o elog src/elog.cxx mxml.o crypt.o strlcpy.o -lssl -lkrb5 -lldap -llber
c++ -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-result -Imxml -DHAVE_SSL -DHAVE_KRB5 -DHAVE_LDAP -w -c -o auth.o src/auth.cxx
src/auth.cxx: In function 'int auth_verify_password_ldap(LOGBOOK*, const char*, const char*, char*, int)':
src/auth.cxx:283:60: error: 'ldap_simple_bind_s' was not declared in this scope
    bind = ldap_simple_bind_s(ldap_ld, ldap_bindDN, password);
                                                            ^
src/auth.cxx:290:26: error: 'ldap_unbind' was not declared in this scope
       ldap_unbind(ldap_ld);
                          ^
src/auth.cxx:295:23: error: 'ldap_unbind' was not declared in this scope
    ldap_unbind(ldap_ld);
                       ^
src/auth.cxx: In function 'int ldap_adduser_file(LOGBOOK*, const char*, const char*, char*, int)':
src/auth.cxx:323:60: error: 'ldap_simple_bind_s' was not declared in this scope
    bind = ldap_simple_bind_s(ldap_ld, ldap_bindDN, password);
                                                            ^
src/auth.cxx:330:26: error: 'ldap_unbind' was not declared in this scope
       ldap_unbind(ldap_ld);
                          ^
src/auth.cxx:358:26: error: 'ldap_unbind' was not declared in this scope
       ldap_unbind(ldap_ld);
                          ^
src/auth.cxx:369:62: error: 'ldap_get_values' was not declared in this scope
          if((values = ldap_get_values(ldap_ld,entry,attribute)) != NULL ) {
                                                              ^
src/auth.cxx:378:35: error: 'ldap_value_free' was not declared in this scope
             ldap_value_free(values);
                                   ^
src/auth.cxx:386:23: error: 'ldap_unbind' was not declared in this scope
    ldap_unbind(ldap_ld);
                       ^
src/auth.cxx: In function 'int auth_verify_password(LOGBOOK*, const char*, const char*, char*, int)':
src/auth.cxx:593:73: error: invalid conversion from 'const char*' to 'char*' [-fpermissive]
          if (get_user_line(lbs, user, NULL, NULL, NULL, NULL, NULL, NULL) == 2) {
                                                                         ^
In file included from src/auth.cxx:30:0:
src/elogd.h:282:5: error:   initializing argument 2 of 'int get_user_line(LOGBOOK*, char*, char*, char*, char*, BOOL*, time_t*, int*)' [-fpermissive]
 int get_user_line(LOGBOOK * lbs, char *user, char *password, char *full_name, char *email,
     ^
make: *** [auth.o] Error 1
error: Bad exit status from /home/il/jeanrigaudl/rpmbuild/tmp/rpm-tmp.cKJL45 (%build)

 

Updated :

  1. from google (https://www.openldap.org/lists/openldap-technical/201104/msg00030.html), it seems it's necessary to add before "#include ldap.h" in src/auth.cxx
#define LDAP_DEPRECATED 1
  1. A cast must be added to src/auth.cxx:593 as already done somewhere with C++ commit :

         if (get_user_line(lbs, (char *) user, NULL, NULL, NULL, NULL, NULL, NULL) == 2) {
 

-> elogd builds now with ldap :-) .

I installed elogd binary and i could login and the css url problem is gone.

 

Thanks to update auth.cxx (2 mods) and buildrpm (2 mods) in git (sorry, no pull request).

 

NB : PAM can not be activated under EL7 with same type of error. I disabled the feature as i do not use it.

 

+ cd elog-3-14
+ make USE_SSL=1 USE_PAM=1 'CFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-result -Imxml'
c++ -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-result -Imxml -DHAVE_SSL -DHAVE_PAM -c -o mxml.o mxml/mxml.cxx
c++ -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-result -Imxml -DHAVE_SSL -DHAVE_PAM -w -c -o crypt.o src/crypt.cxx
c++ -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-result -Imxml -DHAVE_SSL -DHAVE_PAM -c -o strlcpy.o mxml/strlcpy.cxx
c++ -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-result -Imxml -DHAVE_SSL -DHAVE_PAM -o elog src/elog.cxx mxml.o crypt.o strlcpy.o -lssl -lpam -llber
c++ -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-result -Imxml -DHAVE_SSL -DHAVE_PAM -w -c -o auth.o src/auth.cxx
src/auth.cxx: In function 'int elog_conv(int, const pam_message**, pam_response**, void*)':
src/auth.cxx:452:59: error: invalid conversion from 'void*' to 'pam_response*' [-fpermissive]
    if((*resp = calloc(num_msg, sizeof(struct pam_response))) == NULL)
                                                           ^
src/auth.cxx:457:33: error: invalid conversion from 'void*' to 'const char*' [-fpermissive]
    if(!(resptok = strdup(my_data))) {
                                 ^
In file included from src/elogd.h:46:0,
                 from src/auth.cxx:30:
/usr/include/string.h:172:14: error:   initializing argument 1 of 'char* strdup(const char*)' [-fpermissive]
 extern char *strdup (const char *__s)
              ^
make: *** [auth.o] Error 1
error: Bad exit status from /home/il/jeanrigaudl/rpmbuild/tmp/rpm-tmp.V2LE4L (%build)

 

 

 

 

Laurent Jean-Rigaud wrote:

Hi,

I use some CSS for each elog to resize column correcly and it seems that current ELOG version 3.14 available from EPEL for EL7 has a problem (maybe others also).

The browser console displays an error when loading ELOG logbook page (french locale ):

La feuille de style https:/xxxxx.xxx.xx/elog/MCO/1130_171749_REUNION_20221130_Q01.jpgelog-mco.css n’a pas été chargée car son type MIME, « text/html », n’est pas « text/css ».

It seems ELOG server send the css link with enclosure path (https:/xxxxx.xxx.xx/elog/MCO/1130_171749_REUNION_20221130_Q01.jpg) + css file (elog-mco.css) ?!?

I tryed to rebuild the last source from git under EL7 but it fails with LDAP libs (C++ regression already reported in elog:forum/69478). :-(

 

Thanks for help.

Laurent

 

ELOG V3.1.5-fe60aaf