<feed xmlns='http://www.w3.org/2005/Atom'>
<title>packages/net/cgi-io/src, branch master</title>
<subtitle>Mirror of packages feed</subtitle>
<id>https://git.openwrt.org/feed/packages/atom?h=master</id>
<link rel='self' href='https://git.openwrt.org/feed/packages/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/feed/packages/'/>
<updated>2020-10-11T12:54:55Z</updated>
<entry>
<title>cgi-io: move into out of tree project</title>
<updated>2020-10-11T12:54:55Z</updated>
<author>
<name>Petr Štetiar</name>
</author>
<published>2020-10-11T12:54:55Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/feed/packages/commit/?id=08be3279423ed19554905d9cf00a508be0586107'/>
<id>urn:sha1:08be3279423ed19554905d9cf00a508be0586107</id>
<content type='text'>
No functional changes, just moved the sources into out of tree
project[1] so it's going to be easier to do CI with unit testing,
fuzzing etc.

1. https://git.openwrt.org/?p=project/cgi-io.git;a=shortlog

Signed-off-by: Petr Štetiar &lt;ynezz@true.cz&gt;
</content>
</entry>
<entry>
<title>cgi-io: fix compilation against uClibc</title>
<updated>2020-02-27T11:38:15Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2020-02-27T11:38:15Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/feed/packages/commit/?id=ed965cf16fd9ee6a798322b7b73f8c509295f19d'/>
<id>urn:sha1:ed965cf16fd9ee6a798322b7b73f8c509295f19d</id>
<content type='text'>
Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
<entry>
<title>cgi-io: use O_TMPFILE for uploads and attempt to directly link target file</title>
<updated>2020-02-22T17:17:33Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2020-02-21T23:13:32Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/feed/packages/commit/?id=4f4a7e9532e55a16336b79b74b5fb0236e365279'/>
<id>urn:sha1:4f4a7e9532e55a16336b79b74b5fb0236e365279</id>
<content type='text'>
Create an anonymous inode in /tmp using O_TMPFILE and attempt to link the
file in place using linkat(). Only fall back to the old file copy when
linking the tempfile fails.

Avoids double memory use if both the temporary upload file and the
destination file are located in /tmp.

Ref: https://github.com/openwrt/luci/issues/3654
Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
<entry>
<title>cgi-io: use dynamic memory for post decoding, support proc files</title>
<updated>2020-02-13T07:38:32Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2020-02-10T17:19:34Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/feed/packages/commit/?id=39087eba18011ca1e064c8e356ee33533be760db'/>
<id>urn:sha1:39087eba18011ca1e064c8e356ee33533be760db</id>
<content type='text'>
Allocate dynamic buffer memory for decoding post data and allow post
requsts up to 128KB compared to the previos 1KB limit.

Also support downloading /proc and /sys files by falling back to
chunked transfer encoding when the file size cannot be determined.

Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
<entry>
<title>cgi-io: close pipe descriptors early</title>
<updated>2019-12-18T10:00:15Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2019-12-18T08:32:38Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/feed/packages/commit/?id=dde503da13d5d0541187e81eda15e7693f38cb4f'/>
<id>urn:sha1:dde503da13d5d0541187e81eda15e7693f38cb4f</id>
<content type='text'>
In the command read side, close the superfluous write end of the pipe
early to ensure that EOF is reliably detected. Without that change, splice
calls to read from the pipe will occasionally hang until the CGI process
is eventually killed due to timeout.

Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
<entry>
<title>cgi-io: implement exec action</title>
<updated>2019-12-13T09:38:35Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2019-12-13T08:08:51Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/feed/packages/commit/?id=b2a890f6adb9014a6db38c0b4231c42598a8512d'/>
<id>urn:sha1:b2a890f6adb9014a6db38c0b4231c42598a8512d</id>
<content type='text'>
Implement a new "cgi-exec" applet which allows to invoke remote commands
and stream their stdandard output back to the client via HTTP. This is
needed in cases where large amounts of data or binary encoded contents
such as tar archives need to be transferred, which are unsuitable to be
transported via ubus directly.

The exec call is guarded by the same ACL semantics as rpcd's file plugin,
means in order to be able to execute a command remotely, the ubus session
identified by the given session ID must have read access to the "exec"
function of the "cgi-io" scope and an explicit "exec" permission rule for
the invoked command in the "file" scope.

In order to initiate a transfer, a POST request in x-www-form-urlencoded
format must be sent to the applet, with one field "sessionid" holding
the login session and another field "command" specifiying the commandline
to invoke.

Further optional fields are "filename" which - if present - will cause
the download applet to set a Content-Dispostition header and "mimetype"
which allows to let the applet respond with a specific type instead of
the default "application/octet-stream".

Below is an example for the required ACL rules to grant exec access to
both the "date" and "iptables" commands. The "date" rule specifies the
base name of the executable and thus allows invocation with arbitrary
parameters while the latter "iptables" rule merely allows one specific
set of arguments which must appear exactly in the given order.

    ubus call session grant '{
        "ubus_rpc_session": "...",
        "scope": "cgi-io",
        "objects": [
            [ "exec", "read" ]
        ]
    }'

    ubus call session grant '{
        "ubus_rpc_session": "...",
        "scope": "file",
        "objects": [
            [ "/bin/date", "exec" ],
            [ "/usr/sbin/iptables -n -v -L", "exec" ]
        ]
   }'

Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
<entry>
<title>cgi-io: iron out extra compiler warnings</title>
<updated>2019-10-11T14:03:54Z</updated>
<author>
<name>Petr Štetiar</name>
</author>
<published>2019-10-11T13:07:17Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/feed/packages/commit/?id=bb6cdb804cc4db12cca776f559baa6d989a992ec'/>
<id>urn:sha1:bb6cdb804cc4db12cca776f559baa6d989a992ec</id>
<content type='text'>
Fixes following errors:

 main.c:458:37: error: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Werror=sign-compare]
 main.c:463:17: error: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Werror=sign-compare]
 main.c:518:35: error: comparison of integer expressions of different signedness: ‘ssize_t’ {aka ‘long int’} and ‘size_t’ {aka ‘long unsigned int’} [-Werror=sign-compare]
 main.c:157:3: error: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Werror=unused-result]
 main.c:763:3: error: ignoring return value of ‘chdir’, declared with attribute warn_unused_result [-Werror=unused-result]

Signed-off-by: Petr Štetiar &lt;ynezz@true.cz&gt;
</content>
</entry>
<entry>
<title>cgi-io: cmake: enable extra compiler warnings</title>
<updated>2019-10-11T14:03:54Z</updated>
<author>
<name>Petr Štetiar</name>
</author>
<published>2019-10-11T13:03:04Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/feed/packages/commit/?id=4e7411a8d0a46363f9946bff762eda70d5d5de6c'/>
<id>urn:sha1:4e7411a8d0a46363f9946bff762eda70d5d5de6c</id>
<content type='text'>
Spotting issues during compilation is cheaper.

Signed-off-by: Petr Štetiar &lt;ynezz@true.cz&gt;
</content>
</entry>
<entry>
<title>cgi-io: cmake: fix libraries lookup</title>
<updated>2019-10-11T14:03:54Z</updated>
<author>
<name>Petr Štetiar</name>
</author>
<published>2019-10-11T13:01:42Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/feed/packages/commit/?id=fd47e99be4fcd9b1261a4f359279d63199fff6c3'/>
<id>urn:sha1:fd47e99be4fcd9b1261a4f359279d63199fff6c3</id>
<content type='text'>
In order to make it compile properly in more environments.

Signed-off-by: Petr Štetiar &lt;ynezz@true.cz&gt;
</content>
</entry>
<entry>
<title>cgi-io: fix read after end errors</title>
<updated>2019-10-10T18:02:30Z</updated>
<author>
<name>Ansuel Smith</name>
</author>
<published>2019-10-08T20:34:11Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/feed/packages/commit/?id=535b2b6bd8a7f7a0a7a6914c8091619ea6f8961f'/>
<id>urn:sha1:535b2b6bd8a7f7a0a7a6914c8091619ea6f8961f</id>
<content type='text'>
Currently cgi-io try to read data after the data ended.
- Adds "-" to whitelist char
- In main_upload is tried to consume the buffer while it's already readed by the while loop before

Signed-off-by: Ansuel Smith &lt;ansuelsmth@gmail.com&gt;
</content>
</entry>
</feed>
