Commit Graph
4924 Commits
Author SHA1 Message Date
Christian Grothoff 8ba95f2eb5 simplify 2011-03-15 10:03:17 +00:00
Christian Grothoff cd8920a28d libmicrohttpd] bug in MHD_create_response_from_fd_at_offset()
From: 
Eivind Sarto <ivan@espial.com>
  To: 
"libmicrohttpd@gnu.org" <libmicrohttpd@gnu.org>
  Date: 
Today 09:32:21 pm
   
  Spam Status: Spamassassin 0% probability of being spam.

Full report:
Probability=No, score=-2.6 required=7.0 tests=BAYES_00 autolearn=ham version=3.2.5-tuminfo_1  
There appears to be a bug in  MHD_create_response_from_fd_at_offset().
Calling this function with anything other than a zero offset will cause wrong data
or no data (sendfile fails if length < 0).

If you use this call with any application that uses ranges, this bug will trigger.

In src/daemon/daemon.c: send_param_adapter()
      .....
      /* can use sendfile */
      offset = (off_t) connection->response_write_position + connection->response->fd_off;
#ifdef BUGFIX
      /* correct */
      left = connection->response->total_size -  connection->response_write_position;
#else
      left = connection->response->total_size - offset;
#endif
      if (left > SSIZE_MAX)
        left = SSIZE_MAX; /* cap at return value limit */
      ret = sendfile (connection->socket_fd,
                      fd,
                      &offset,
                      left);


-eivind
2011-03-11 21:30:24 +00:00
Christian Grothoff 4899ea8e77 undo 2011-03-07 10:41:00 +00:00
Matthias Wachs 50514ddec0 fixifx 2011-03-07 10:24:42 +00:00
Christian Grothoff 30f4e693ce fixing 1667 2011-03-05 21:03:21 +00:00
Christian Grothoff 381be7260e add to exports 2011-03-04 11:34:05 +00:00
Christian Grothoff 3145e9a33d bump 2011-03-04 09:58:58 +00:00
Christian Grothoff f7ae5a3412 adding API to handle #1661 (allow externally created connections) 2011-03-04 09:33:32 +00:00
Christian Grothoff 45a0a30893 also eliminating use of pipe, thereby addressing #1662 2011-03-04 09:10:03 +00:00
Christian Grothoff 073951d682 ignores 2011-03-04 08:11:45 +00:00
Christian Grothoff 8a5cf8f14f fixing 1666 2011-03-03 20:45:20 +00:00
Christian Grothoff 9006e7df90 ex 2011-03-03 18:22:06 +00:00
Christian Grothoff c8be1686bc missing 2011-03-03 18:18:28 +00:00
Christian Grothoff dc2697790f example 2011-03-03 18:15:23 +00:00
Christian Grothoff 260dd93fda enable poll more broadly, fix timeout, use pipe instead of signal 2011-03-01 15:09:14 +00:00
Christian Grothoff d4a325b3ed man 2011-03-01 15:08:50 +00:00
Christian Grothoff 449bb33ca0 removing useless code 2011-02-23 13:23:20 +00:00
Christian Grothoff 94c463e999 missing include 2011-02-19 20:06:29 +00:00
Christian Grothoff 18177698ac try to handle sendfile corner cases better 2011-02-18 10:05:26 +00:00
Christian Grothoff 74019e111c incs 2011-02-17 14:46:51 +00:00
Christian Grothoff eb1bd273c3 incs 2011-02-17 14:45:35 +00:00
Christian Grothoff f1e95777a2 097 2011-02-13 10:31:51 +00:00
Christian Grothoff ae668d2eca fix gnutls error handling 2011-02-13 09:53:44 +00:00
Christian Grothoff 6abbeb5f40 mantis 1659 2011-02-11 09:16:23 +00:00
Christian Grothoff 5eba2735dc Patch für libmicrohttpd-Doku
From: 
Michael Wiegand <michael.wiegand@greenbone.net>  (Greenbone Networks GmbH)
  To: 
christian@grothoff.org
  Date: 
Today 12:39:11 pm
  Attachments: 
 microhttpd.texi-typo-fixes.patch
   
Hallo Christian,

ich habe ein paar Typos in der Doku von libmicrohttpd gefunden, siehe 
angehängter Patch.

Oder nimmst du Patches lieber über die Liste? Habe mich jetzt auch endlich 
angemeldet. :)

Grüße aus Osnabrück

Michael
2011-02-07 12:56:20 +00:00
Christian Grothoff d251f28095 mantis 1652 2011-01-27 09:52:23 +00:00
Christian Grothoff 1d5bf289b4 mantis 1651 2011-01-27 09:49:34 +00:00
Christian Grothoff 0c435287dc should be sockaddr, not sockaddr_in 2011-01-27 09:02:25 +00:00
Christian Grothoff c216670930 docu 2011-01-27 08:56:36 +00:00
Christian Grothoff b72654d5b4 docu 2011-01-27 08:56:27 +00:00
Christian Grothoff c7729110a0 release 2011-01-25 13:15:43 +00:00
Christian Grothoff 67bd27b5c1 fixing 1646 2011-01-24 15:37:17 +00:00
Christian Grothoff 631c1d244c dead 2011-01-20 10:56:54 +00:00
Christian Grothoff 5a6952fe90 [libmicrohttpd] [digest-auth]: bug in hash algorithm
From: 
Andreas Wehrmann <a.wehrmann@centersystems.com>
  To: 
libmicrohttpd@gnu.org
  Date: 
Today 08:58:43 am
   
  Spam Status: Spamassassin 0% probability of being spam.

Full report:
Probability=No, score=-3.2 required=7.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5-tuminfo_1  
Hello!

I wrote a little testpage that I deliver using libmicrohttpd using 
digest authentication.
The testpage consists of four files (framed page + image file).
When I initially connected to the webserver via the browser it correctly 
challenged me
for my credentials. However, after entering the username and password 
the index file
got loaded but it happened that the browser then challenged me again for 
each
additional file to be loaded.
Since this is very annoying I tried increasing the nonce table size to 3000
(was default) but it was no good.
I then dug a little deeper and found out, that the hash algorithm to 
determine the index
for a given nonce always returned zero thus overwriting other nonces.
The offending line is at check_nonce_nc() in digestauth.c:313:

off = (off << 8) | (*np & (off >> 24));

whereas is should be:

off = (off << 8) | (*np ^ (off >> 24));

Since "off" is initialized with zero and an unsigned integer
a logical AND returns zero which is not right obviously.
After this fix, the server challenged me only once and I got "random" 
indices.
I found the problem in libmicrohttpd 0.9.5.

Best regards,
Andreas Wehrmann

-- 
Dipl.-Ing. (FH) Andreas Wehrmann
Software Development
--------------------------------------------------------------
Center Communication Systems GmbH
A-1210 Wien, Ignaz-Köck-Straße 19
Sitz in Wien
FN 796 88p, Firmenbuchgericht Wien
www.centersystems.com

Tel.: +43 (0) 190 199 - 3616
Mobile: +43 (0) 664 884 75916
Fax: +43 (0) 190 199 - 2110
E-Mail: a.wehrmann@centersystems.com
2011-01-18 23:00:02 +00:00
Christian Grothoff 3d970622b7 nullcheck 2011-01-14 18:27:18 +00:00
Christian Grothoff c5c36d954b nullcheck 2011-01-14 18:26:50 +00:00
Christian Grothoff 39b6c2e1c5 nullcheck 2011-01-14 18:21:17 +00:00
Christian Grothoff 1bc35ab974 fixes 2011-01-14 18:20:19 +00:00
Christian Grothoff e3401afa64 [libmicrohttpd] fix doc typo: s/USER/USE/ in MHD_USER_THREAD_PER_CONNECTION
From: 
Jim Meyering <jim@meyering.net>
  To: 
libmicrohttpd@gnu.org
  Date: 
Today 12:42:34
   
  Spam Status: Spamassassin 0% probability of being spam.

Full report:
Probability=No, score=-3.7 required=7.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5-tuminfo_1  
Here is a patch to fix two typo fixes (and grammar nit).
I didn't change microhttpd.info, since it's generated.
(personally, I would not version-control a generated .info file)

Index: ChangeLog
2011-01-13 14:02:37 +00:00
Christian Grothoff 6653abee2e release 2011-01-10 13:11:13 +00:00
Christian Grothoff b454d32814 fix 1636 2011-01-05 14:25:18 +00:00
Christian Grothoff ccaa16a264 fix 1639 2011-01-05 14:22:01 +00:00
Christian Grothoff 43542a78c6 introducing MHD_create_response_from_buffer, deprecating MHD_create_response_from_data 2011-01-04 12:40:03 +00:00
Christian Grothoff 3af8f4ce64 updating docs 2011-01-01 13:47:44 +00:00
Christian Grothoff 964326eb53 typo 2010-12-26 13:59:18 +00:00
Christian Grothoff 7273179911 oops 2010-12-26 01:16:47 +00:00
Christian Grothoff 3e0f54c480 vers 2010-12-25 22:18:51 +00:00
Christian Grothoff e4a7daa225 acking 2010-12-25 21:58:15 +00:00
Christian Grothoff bf47e27d79 removing client authentication API, moving it into tutorial 2010-12-25 21:57:23 +00:00
Christian Grothoff fe4e71ecaa client certs and basic auth support, unmodified patch from MS 2010-12-25 20:58:06 +00:00