Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 735 of 796  Not logged in ELOG logo
    icon2.gif   [patch] Re: images attached shown as inline , posted by Stefan Ritt on Sat Feb 12 17:48:51 2005 
Are you sure that this does not stretch small images? Please see elog:931

> two new elog.conf parameters are defined:
> Attached image width          ; width of full view image attached
> Attached image width entry    ; width of attached image in the entry list view

I would rather go with a new class in the CSS file to contain this options, since I 
want to keep the number of options as small as possible.
icon3.gif   [patch]: fixed wrong extention check, posted by Emiliano Gabrielli on Tue Feb 8 17:40:54 2005 
current version uses strstr() to check if the file has the expected ascii
text extension ... this is buggy becouse this way a file named
".txt_hidden_file" or "foo.config.dat" are both seen as .txt files.

the following patch fixes the problem, plz apply to cvs:



#######################################################################
--- elogd_orig.c        2005-02-03 16:46:10.000000000 +0100
+++ elogd_extchk_fix.c  2005-02-08 17:32:21.000000000 +0100
@@ -1160,6 +1160,28 @@

 #define my_toupper(_c)    ( ((_c)>='a' && (_c)<='z') ? ((_c)-'a'+'A') : (_c) )

+static BOOL chkext(const char *str, const char *ext)
+{
+   int extl, strl;
+   char c1, c2;
+
+   if (ext == NULL || str == NULL)
+      return FALSE;
+
+   extl = strlen(ext);
+   strl = strlen(str);
+   if (extl >= strl)
+      return FALSE;
+   str = str+strl-extl;
+   while (*str) {
+      c1 = *str++;
+      c2 = *ext++;
+      if (my_toupper(c1) != my_toupper(c2))
+         return FALSE;
+   }
+   return TRUE;
+}
+
 BOOL strieq(const char *str1, const char *str2)
 {
    char c1, c2;
@@ -1168,6 +1190,8 @@
       return TRUE;
    if (str1 == NULL || str2 == NULL)
       return FALSE;
+   if (strlen(str1)!=strlen(str2))
+      return FALSE;

    while (*str1) {
       c1 = *str1++;
@@ -13698,8 +13722,8 @@
                       ("<tr><td colspan=%d class=\"attachment\">%s %d: <a
href=\"%s\">%s</a>\n",
                        colspan, loc("Attachment"), index + 1, ref,
attachment[index] + 14);

-                  if ((strstr(str, ".TXT") || strstr(str, ".ASC") ||
strstr(str, ".CFG")
-                       || strstr(str, ".CONF")
+                  if ((chkext(str, ".TXT") || chkext(str, ".ASC") ||
chkext(str, ".CFG")
+                       || chkext(str, ".CONF")
                        || strchr(str, '.') == NULL) && show_attachments) {
                      /* display attachment */
                      rsprintf("</td></tr><tr><td colspan=%d
class=\"messagelist\"><pre>", colspan);
@@ -14779,7 +14803,7 @@
    regex_t re_buf[MAX_N_ATTR + 1];
    regmatch_t pmatch[10];

-   /* redirect if enpty parameters */
+   /* redirect if empty parameters */
    if (strstr(_cmdline, "=&")) {
       while ((pt1 = strstr(_cmdline, "=&")) != NULL) {
          pt2 = pt1;
#######################################################################
    icon2.gif   [solved] Re: Use X-Forwarded-User as preset in author field, posted by Stefano Lacaprara on Thu May 18 16:55:42 2017 
> 
> Sorry, I just double-checked, this userdatabase, I was talking about is the Password-file...
> 
> Please try the following snippet :
> 
> allow password change = 0
> Authentication = Webserver, File
> Preset Author = $short_name <$long_name>
> Locked Attributes = Author
> Password file = PASSWD.file
> 
> Christof

Many thanks, that is what I was looking for.

best,
  Stefano
icon1.gif   [code] should be a sort of <CDATA >, posted by Emiliano Gabrielli on Wed Jul 13 15:09:48 2005 
Using the [code] elocode should be intended also to preserve the tagged text from beeing parsed as html or elcode itself ..

this is an example:

Quote:
Note that, for security reasons, you should check the MD5 FINGERPRINT of the SSL certificate issued by the server agaist the following one:

MD5 Fingerprint = 23:A7:AD:33:3C:08:BE:2A:62:6E:85:DF:B8:00:23:40


Thank you
icon4.gif   a bug and a question, posted by mo on Wed Jul 10 22:19:47 2002 
   If you have only one entry in the logbook and have it set up in threaded 
mode like: ?cmd=Search&mode=threaded&reverse=1, when you click on the icon 
of the entry or the number of the entry to see it, it does not allow you 
to.  If there is more than one entry, it works fine.  
   Also I wanted to make a submit page from where you could either go back 
to the logbook which you just entered a message for or type a new entry for 
that logbook.  First of all, is there a way to have only one file called 
submitpage.html in which I can define this for all logbooks or do i need it 
for ever logbook.  And also, is there a way I can even set a link that will 
allow to create a new entry.  I tried: 
    <a href="demo/?cmd=new">Enter</a> another message<p>

but for some reason it does not work.  Is there a way to implement this?

Thanks,
Mo
    icon2.gif   a hack around, posted by Andrey on Thu Dec 29 20:26:11 2022 

FYI.

Removing "wrap=hard" on the line #11461 in the elogd.cxx file resolves my problem.

 

- rsprintf("<textarea rows=%d cols=%d wrap=hard name=\"Text\">\n", height, width);*/
+ rsprintf("<textarea rows=%d cols=%d name=\"Text\">\n", height, width);

    icon2.gif   a hack around, posted by Konstantin Olchanski on Fri Dec 30 00:46:03 2022 
- rsprintf(&quot;&lt;textarea rows=%d cols=%d wrap=hard name=\&quot;Text\&quot;&gt;\n&quot;, height, width);
+ rsprintf(&quot;&lt;textarea rows=%d cols=%d name=\&quot;Text\&quot;&gt;\n&quot;, height, width);

my vote is to remove "wrap=hard":

1) I try to read the specs and my head explodes: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea
2) textarea should just accept input typed by user, should not try to "neatify" it. if user wants long lines, we should let them.
3) this bug (introduced in recent safari, the best I can tell)

K.O.
    icon2.gif   a hack around, posted by Stefan Ritt on Wed Jan 4 09:33:25 2023 
> - rsprintf(&quot;&lt;textarea rows=%d cols=%d wrap=hard name=\&quot;Text\&quot;&gt;\n&quot;, height, width);
> + rsprintf(&quot;&lt;textarea rows=%d cols=%d name=\&quot;Text\&quot;&gt;\n&quot;, height, width);
> 
> my vote is to remove "wrap=hard":
> 
> 1) I try to read the specs and my head explodes: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea
> 2) textarea should just accept input typed by user, should not try to "neatify" it. if user wants long lines, we should let them.
> 3) this bug (introduced in recent safari, the best I can tell)
> 
> K.O.

I agree with K.O. Does anybody see a problem in removing "wrap=hard"? 

It was there more for historical reasons. In the old days screens were not so wide and wrapping was more of an issue.
People tended to write longer lines and complained that the long lines got reformatted differently for different screen
sizes. So by adding hard CRLF the formatting looked the same on different screens. These days this is not such an issue
any more and I agree with 2) above. If the user wants a long line, the user should get it.

Stefan
ELOG V3.1.5-2eba886