1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-05 17:30:38 +02:00
Commit Graph

63 Commits

Author SHA1 Message Date
jow
d61356769c [package] uhttpd: various changes
- remove unused variables
	- simply ignore command line args which belong to not enabled features
	- resolve peer address at accept() time, should solve (#11850)
	- remove floating point operations where possible

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32704 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-07-13 17:10:56 +00:00
jow
696a47b2fb [package] uhttpd: retry parsing the CGI header until the buffer space is exhausted
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32662 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-07-11 09:59:05 +00:00
jow
84032b177b [package] uhttpd: various fixes
- avoid closing descriptors before removing them from uloop (#11755, #11830)
    - do not auto-initialize ubus if no prefix is set (#11832)
    - remove extraneous client context pointer from cgi and lua states
    - code cleanups and debug message changes

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32651 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-07-09 00:08:20 +00:00
jow
61cbda806f [package] uhttpd: do not dispatch pipe error events, fixes use after free for cgi and lua scripts
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32644 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-07-07 16:43:27 +00:00
jow
c2e7896dea [package] uhttpd: do not subscribe to epoll write events
Watch child read pipe end for data instead of relying on socket write
notification to process cgi data, should lower cpu consumption during
requests on weaker devices.

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32640 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-07-06 17:29:25 +00:00
jow
31767f1683 [package] uhttpd: finish inherited uloop in forked childs, fixes misdispatched events leading to race conditions and bad memory accesses
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32419 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-06-18 00:41:43 +00:00
jow
2498cec75c [package] uhttpd: remove some dead code
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32028 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-06-02 15:08:54 +00:00
jow
f76b152928 [package] uhttpd: add explicit stdin eof notification for Lua and CGI childs
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32027 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-06-02 14:56:24 +00:00
jow
28e515440f [package] uhttpd: fix wrongly applied sizeof() leading to writing beyound end of buffer and subsequent data corruption (#11557)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32005 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-05-30 15:30:07 +00:00
jow
8b4e17bfbc [package] uhttpd:
- rewrite large parts of the server, use uloop event driven structure
	- support concurrent requests and make the upper limit configurable
	- implement initial version of HTTP-to-ubus JSON proxy and session.* namespace
	- add compile time support for debug information
	- code style changes
	- bump package revision

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31931 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-05-28 00:52:24 +00:00
jow
d0f3681e1e [package] uhttpd: display errors in init script, code formatting changes, bump package version
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31572 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-05-03 17:19:22 +00:00
jow
37f687e099 uhttpd: added uhttpd.docroot
Passes the document-root to the Lua handler by placing it in uhttpd.docroot.

It could alternatively be placed in env.DOCUMENT_ROOT which would more closely
resemble the CGI protocol; but would mean that it is not available at the time
when the handler-chunk is loaded but rather not until the handler is called,
without any code savings.

Signed-off-by: David Favro <openwrt@meta-dynamic.com>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31571 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-05-03 17:19:20 +00:00
jow
8329c6da4f Fixed: [PATCH 2/3] uhttpd URL-codec enhancements.
My apologies, the 2nd of those patches had a syntax error -- that's what
I get for making a last-minute edit, even to the comments, without
testing! :-p

Here is the corrected patch.

-- David

From d259cff104d2084455476b82e92a3a27524f4263 Mon Sep 17 00:00:00 2001
From: David Favro <openwrt@meta-dynamic.com>
Date: Fri, 27 Apr 2012 14:17:52 -0400
Subject: [PATCH] uhttpd URL-codec enhancements.

* uh_urlencode() and uh_urldecode() now return an error condition for
  buffer-overflow and malformed-encoding rather than normal return with corrupt
  or truncated data.  As HTTP request processing is currently implemented, this
  causes a 404 HTTP status returned to the client, while 400 is more
  appropriate.

* Exposed urlencode() to Lua.

* Lua's uhttpd.urlencode() and .urldecode() now raise an error condition for
  buffer-overflow and malformed-encoding rather than normal return with
  incorrect data.

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31570 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-05-03 17:19:18 +00:00
jow
f6dc56506d uhttpd URL-codec bug fixes.
* Fixed output-buffer-overflow bug in uh_urlencode() and uh_urldecode() [tested
  input-buffer index against output-buffer length].  In reality, this would not
  typically cause an overflow on decode, where the output string would be
  expected to be shorter than the input string; and uh_urlencode() seems to have
  been unreferenced in the source.

* Fixed bug: uh_urlencode() and uh_urldecode() both read one extra byte from the
  input-string.  While this could manifest in C code, the result was most
  egregious when called from Lua, where it caused an extra null byte to be
  embedded at the end of the output string.

* uh_urlencode() cleanup: removed redundant bitwise-and.

Signed-off-by: David Favro <openwrt@meta-dynamic.com>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31569 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-05-03 17:19:16 +00:00
jow
0182feb5e7 [package] uhttpd: reorder compiler flags to fix native build on Ubuntu 11.x
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30936 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-03-13 20:41:31 +00:00
jow
ea16273623 [package] uhttpd: cope with variable number of spaces in header lines (#11079)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30806 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-03-04 15:53:51 +00:00
jow
e512826d64 [package] uhttpd: prevent linking uhttpd binary against crypto libraries
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29152 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-11-15 10:17:59 +00:00
jow
81199b8bf5 [package] uhttpd: cope with DES crypted passwd entries by not relying on a leading dollar sign to indicate a cipher
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28886 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-11-09 18:55:28 +00:00
nico
ad906c1492 package/uhttpd: use new service wrapper
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28841 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-11-07 22:59:06 +00:00
jow
0920594b94 [package] uhttpd: provide rpath-link flag, thanks mazilo
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28792 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-11-07 00:10:52 +00:00
jow
e016e9a75b uhttpd: Fix wrong certificate options with multiple words
For instance two word city names will result in weird certificates.
Therefore adding the missing quotations.

Signed-off-by: Linus Lüssing <linus.luessing@web.de>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28776 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-11-06 15:44:42 +00:00
jow
44c760170b [package] uhttpd: fix Makefiles and linking of tls plugin
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28769 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-11-05 17:36:47 +00:00
jow
0ce6c05420 [package] uhttpd: bump version
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28762 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-11-05 03:19:29 +00:00
jow
52f10ff67f [package] uhttpd: rework CyaSSL and OpenSSL integration; move protected recv() and send() operations below the ssl layer - fixes hangs when accessing via https
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28761 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-11-05 03:19:07 +00:00
jow
428f843cf0 [package] uhttpd: fix bad pointer use in previous commit
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28257 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-09-18 23:34:25 +00:00
jow
d79be89004 [package] uhttpd: fix possible CGI header line parsing beyound the empty line, thanks Linus Luessing for spotting it
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28254 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-09-18 22:30:20 +00:00
jow
a5692ac58a [package] uhttpd: properly match mimetype entries which cover the whole filename (#8236)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28160 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-09-04 10:21:05 +00:00
jow
8cb8af6601 [package] uhttpd: add "application/x-ns-proxy-autoconfig" mime type (#8236)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28149 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-09-02 13:28:29 +00:00
jow
9f8e06da3f [package] uhttpd: pass feature flags (#9742)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27689 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-07-19 06:59:47 +00:00
jow
0dd0ee4944 [package] uhttpd: support building against openssl instead of cyassl, minor cleanups (#7827)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27686 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-07-18 14:18:31 +00:00
jow
a80dbef8bf [package] uhttpd: unblock signals in CGI childs, solves hanging ssh logout after server restart from within LuCI and similar problems
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27628 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-07-17 07:18:59 +00:00
cshore
19f3bc1a6d [package] uhttpd: Moved uhttpd to Network|Web Servers/Proxies submenu, just like all the other web serves and proxies from the packages feed
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@26062 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-03-12 04:47:02 +00:00
jow
80f4d42164 [package] uhttpd: substitute "+" with space when using the -d flag, lazyload tls support
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@25220 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-01-28 19:50:33 +00:00
jow
6e21adc1e0 [package] uhttpd: protect tcp receive operations with select, make tcp keep-alive optional (#8272)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@24952 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-01-09 23:35:45 +00:00
jow
a95c3294df [package] uhttpd: allow lowercase http header fields (#8513)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@24823 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-12-24 22:03:34 +00:00
jow
d7995fd6da [package] uhttpd: redirect to same location with trailing slash appended if directories are requested
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@23952 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-11-10 20:52:30 +00:00
jow
232ec2e0d2 [package] uhttpd: make it work without shadow password support
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@23897 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-11-06 16:19:04 +00:00
jow
ad72ee2eb6 [package] uhttpd: revert unrelated change in previous commit
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@23261 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-10-05 19:35:38 +00:00
jow
ce67681a34 [package] uhttpd: add /etc/uhttpd.key and /etc/uhttpd.crt to conffile hints
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@23260 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-10-05 19:34:22 +00:00
jow
f2b88b6980 [package] add maintainer information
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@23159 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-09-30 10:48:37 +00:00
jow
8c59fddb36 [package] uhttpd: break tight loop when receiving eof during header reading (#7904)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22988 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-09-09 20:15:02 +00:00
jow
93019f8780 [package] uhttpd: fix segfault triggered by Basic Auth checking
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22805 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-08-25 21:38:48 +00:00
jow
8618e98eab [package] uhttpd:
- fix parsing of interpreter entries in the config file, fixes serving of static files as .cgi with X-Wrt
	- better cope with connection aborts, especially during header transfer
	- fix return value checking of TLS reads and writes, solves some blocking issues


git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22692 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-08-18 00:04:52 +00:00
jow
2540dbba3b [package] uhttpd:
- more robust handling of network failures on static file serving
	- support unlimited amount of authentication realms, listener and client sockets
	- support for interpreters (.php => /usr/bin/php-cgi)


git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22630 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-08-14 00:54:24 +00:00
jow
a6757e481a [package] uhttpd: fix segmentation fault triggered by invalid header line
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22607 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-08-12 10:56:41 +00:00
jow
01658f6e25 [package] uhttpd:
- abort file serving if client connection is lost (#7742)
	- don't send bad request headers twice


git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22602 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-08-11 23:44:30 +00:00
jow
89c5fd5909 [package] uhttpd: make init script less verbose
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22593 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-08-11 13:30:47 +00:00
jow
fd370b6947 [package] uhttpd: add option to reject requests from RFC1918 IPs to public server IPs (DNS rebinding countermeasure)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22589 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-08-11 00:05:34 +00:00
jow
8d60ad1361 [package] uhttpd: fix build dependencies (#7674)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22404 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-07-27 21:19:28 +00:00
jow
e417063c23 [package] uhttpd:
- fix a compile warning
	- support custom index file names
	- support custom error pages (or cgi handler)
	- add option to disable directory listings
	- add REDIRECT_STATUS for CGI requests, fixes php-cgi


git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22366 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-07-23 13:15:22 +00:00