Commit Graph

993 Commits

Author SHA1 Message Date
Hannu Nyman
5dd6b148ee csstidy: Fix PKG_MIRROR_HASH after .zst change
Adjust PKG_MIRROR_HASH to the filename change due to .zst adoption.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2024-04-07 15:38:34 +03:00
Hannu Nyman
d1269d63da lucihttp: Fix PKG_MIRROR_HASH after .zst change
Adjust PKG_MIRROR_HASH to the filename change due to .zst adoption.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2024-04-07 15:35:07 +03:00
Hannu Nyman
03418d4e40 csstidy: Fix PKG_MIRROR_HASH after APK changes
Adjust PKG_MIRROR_HASH to the filename logic change due to
APK preparations.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2024-04-03 20:35:47 +03:00
Hannu Nyman
b2f8d0e2ad lucihttp: Fix PKG_MIRROR_HASH after APK changes
Adjust PKG_MIRROR_HASH to the filename logic change due to
APK preparations.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2024-04-03 20:32:02 +03:00
Jo-Philipp Wich
b3d661cd84 ucode-mod-html: fix build with gcc 5
Older gcc versions raise a `label at end of compound statement` error due
to the empty default case. Fix the problem by adding an explicit `break`
statement.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2023-08-08 20:49:31 +02:00
Jo-Philipp Wich
0f6e1663ca lucihttp: update to latest Git HEAD
9b5b683 multipart-parser: properly handle parts with trailing CR

Fixes: #6282
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2023-03-15 01:07:09 +01:00
Jo-Philipp Wich
5c5f4a8d1f contrib: introduce ucode-mod-html
The ucode-mod-html library provides assorted utility functions for dealing
with HTML markup data.

Example usage:

    #!/usr/bin/ucode

    'use strict';

    import { tokenize, striptags, entitydecode, entityencode,
             OPEN, ATTR, TEXT, CLOSE, RAW, COMMENT, CDATA, PROCINST, EOF } from 'html';

    tokenize('<div class="example">Hello world!</div>...',
        function(type, text, value) {
            switch (type) {
            case OPEN:     print(`Opening tag: ${text}\n`); break;
            case ATTR:     print(`Attribute:   ${text}${value ? `=${value}`}\n`; break;
            case TEXT:     print(`Text data:   ${text}\n`); break;
            case CLOSE:    print(`Closing tag: ${text}\n`); break;
            case RAW:      print(`Script/CSS:  ${text}\n`); break;
            case COMMENT:  print(`Comment:     ${text}\n`); break;
            case CDATA:    print(`CDATA text:  ${text}\n`); break;
            case PROCINST: print(`<!...> tag:  ${text}\n`); break;
            case EOF:      print(`End of input\n`);         break;
            }
        }
    );

    print(striptags('<p>This is some <b>text</b> with <br> markup</p>\n'));
    print(entitydecode('&#60; &#x20; &amp; &auml;'));
    print(entityencode('1 < 2 && "foo"'));

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-10-25 01:03:36 +02:00
Jo-Philipp Wich
c1ceeebdd0 ucode-mod-lua: improve error reporting
Avoid redundancies in generated exception messages and include Lua
tracebacks when catching exceptions in protected calls.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-10-25 01:03:36 +02:00
Jo-Philipp Wich
629eb171b7 ucode-mod-lua: various fixes
Properly handle accesses to properties of the userdatum itself in the
lua_uv_index() __index metamethod and treat integer keys as array indexes
in case of wrapped ucode array values. Also fix an incorrect refcount
decrement in the function.

Also fix uc_lua_vm_get() and uc_lua_lv_getraw() to gracefully handle
accesses to not defined or non-table values and ensure that those functions
properly reset the Lua stack after they complete.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-08-30 00:06:15 +02:00
Jo-Philipp Wich
42201e336d ucode-mod-lua: support prototype lookups and method calls on ucode values
Expose ucode arrays and objects with prototypes as userdata proxy objects
to Lua and extend the userdata metadatable with an __index metamethod to
lookup not found properties in the ucode values prototype chain.

Also extend the __call metamethod implementation to infer method call
status from the activation record in order to invoke ucode functions with
the correct `this` context when called as method from Lua.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-08-26 10:11:17 +02:00
Jo-Philipp Wich
26afb7cbec ucode-mod-lua: add workaround for dynamic Lua extension loading
Reopen self with dlopen(RTLD_GLOBAL) in order to export liblua symbols for
runtime loading of dynamic Lua extensions.

Reported-by: Stijn Tintel <stijn@linux-ipv6.be>
Tested-by: Stijn Tintel <stijn@linux-ipv6.be>
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-07-27 16:22:25 +02:00
Jo-Philipp Wich
2b0539ef9d lucihttp: update to latest Git HEAD
6e68a10 utils: also compare attribute name length in lh_header_attribute()
7b721af testcases: adjust urldecode tests

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-07-08 15:26:23 +02:00
Jo-Philipp Wich
70ff5c3c4a contrib: introduce ucode-mod-lua
The ucode-mod-lua library provides an ucode-to-Lua bridge and a set of
functions to instantiate Lua VMs, invoke Lua functions as well as
exchanging data structures between ucode and Lua.

Example usage:

    #!/usr/bin/ucode

    'use strict';

    const lua = require("lua");

    let vm = lua.create();

    vm.set({
    	hello: function(...args) {
    		print(`A ucode "Hello world" function called from Lua! Got arguments: ${args}\n`);
    	},

    	data_from_ucode: {
    		bool: true,
    		float: 1.3,
    		int: 0x11223344,
    		string: "Hello from ucode!",
    		array: [ 1, 2, 3, null, 5 ],
    		object: {
    			apple: "green",
    			banana: "yellow",
    			[5]: "foo",
    			[-1]: null,
    			nested: {
    				a: [ 5, 6 ],
    				b: { c: NaN }
    			}
    		},
    		regexp: /foo/
    	}
    });

    vm.invoke("hello", true, 123, "Foo");
    vm.eval('print("Print from Lua!", data_from_ucode.int * data_from_ucode.float);');

    try {
    	vm.invoke("error", "Throwing a Lua exception...");
    }
    catch (e) {
    	print(`Caught exception: ${e}\n`);
    }

    print(`Lua VM version is: ${vm.get('_G', '_VERSION').value()}\n`);

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-05-30 14:25:33 +02:00
Jo-Philipp Wich
e870775d39 lucihttp: update to latest Git HEAD
cc85183 ucode: add ucode library binding

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-02-21 14:51:01 +01:00
Jo-Philipp Wich
e266c74903 csstidy: update to latest Git HEAD
707feae parse_css: do not omit white space in url() property values

Ref: 6960819997 (commitcomment-52088358)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-06-13 19:54:36 +02:00
Jo-Philipp Wich
d1fc11d852 lucihttp: update to latest Git HEAD
Fixes compilation under 32bit systems by using the proper printf format
specifier for size_t values.

Also fixes compilation with Ninja by appending instead of
overwriting CMAKE_OPTIONS.

Fixes: #5116
Suggested-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-06-11 08:32:03 +02:00
Jo-Philipp Wich
66c8ebfeff lucihttp: update to latest Git HEAD
a34a17d src: allow overriding buffer size from cli in multipart tester
730a46f lib: fix potentially lost bytes in boundary parsing across buffer limits
8734af2 lib: add buffer tracing to multipart parser
913051b src: add file dump option to multipart test utility
c419539 src: allow specifying custom buffer sizes in multipart testcases
f6e0564 lib: fix handling of empty multipart fields

Fixes: #2816
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-05 08:27:47 +02:00
Jo-Philipp Wich
15608fd2e5 lucihttp: update to latest Git HEAD
f6e0564 lib: fix handling of empty multipart fields
91c01c3 lib: fix multipart state transition in boundary parsing

Fixes: #2737
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-06-05 16:15:40 +02:00
Sven Roederer
4654ba92c3 treewide: move freifunk-related packages to separate repo
Even Freifunk was one of the major factory to create the LuCI-system, it's
now only a very small part of LuCI. LuCI has become a much bigger thing
and it seems that it's time to move the packages only relating to Freifunk
into it's own feed.
On the mailinglist it was discussed [1] and a repo below the general
Freifunk team on github was created.

This commit removes all packages that will be hosted in the new repo [2]

1 - http://lists.freifunk.net/pipermail/wlannews-freifunk.net/2019-February/004818.html
2 - https://github.com/freifunk/openwrt-packages

Signed-off-by: Sven Roederer <freifunk@it-solutions.geroedel.de>
2019-02-13 21:23:34 +01:00
Jo-Philipp Wich
c8e9578586 lucihttp: update to latest Git HEAD
1afbdcc build: add soversion to library

Also adjust ABI_VERSION and install recipe accordingly.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-01-24 12:24:51 +01:00
Jo-Philipp Wich
271f3e1d25 csstidy: update to latest Git HEAD
1d56201 prepare: do not consider "overflow" to be a shorthand for -x, -y

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-12-20 13:03:06 +01:00
Jo-Philipp Wich
aa954d1c69 csstidy: update to latest Git head
33594b4 ("csstidy: do not dequote selector strings")

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-12-12 16:25:59 +01:00
Jo-Philipp Wich
e90431b870 contrib: add csstidy package
Package a fork of the CSSTidy C++ implementation for CSS minification
use in a later commit.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-12-12 09:47:37 +01:00
Martin Hübner
c04b889cc7 community-profiles: create profile for Fürstenwalde
New profile for Fürstenwalde. At the moment we use parts of the Berlin-
infrastructure. Thus I have not changed the ip-address-related things.

Signed-off-by: Martin Hübner <martin.hubner@web.de>
[reword and rewrap commit message]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-11-02 13:55:28 +01:00
Philipp Borgers
5f65547dfd get rid of library version numbers in luci olsrd code
Signed-off-by: Philipp Borgers <borgers@mi.fu-berlin.de>
2018-10-25 21:56:06 +02:00
yangfl
641475ee59 freifunk-watchdog: Fix typos
Signed-off-by: David Yang <mmyangfl@gmail.com>
2018-10-12 22:18:51 +08:00
yangfl
401382a459 treewide: Fix typos in comments
Signed-off-by: David Yang <mmyangfl@gmail.com>
2018-10-10 15:00:07 +08:00
pmelange
400bb53e6e freifunk profiles: add nameserver 80.67.169.40 from www.fdn.fr/actions/dns
Signed-off-by: pmelange <isprotejesvalkata@gmail.com>
2018-10-04 12:10:58 +02:00
Philipp Borgers
eab986432d community-profiles: change subnet of mesh_network option for Berlin
The mesh_network option is used to check the user input. The wizard
checks if the input ip address is part of the mesh_network. We use
multiple /16 networks. There is no support for multiple ranges so we the
10.0.0.0/8.

For reference the ip list:

https://wiki.freifunk.net/IP-Netze

Signed-off-by: Philipp Borgers <borgers@mi.fu-berlin.de>
2018-09-24 13:57:31 +02:00
Jo-Philipp Wich
5c07c6fff3
Merge pull request #1761 from pmelange/ff_olsr_watchdog_del_tnl
ff_olsr_watchdog: delete stale tunnels
2018-07-26 08:41:06 +02:00
pmelange
5d0b720f8b ff_olsrd_watchdog: delete existing tunnels
When OLSRd crashes, the old tunnels still exist.  This can lead to unexpected behaviour.
The tunnels to be removed start with "tnl_"

See freifunk-berlin/firmware#522

Signed-off-by: pmelange <isprotejesvalkata@gmail.com>
2018-07-25 22:50:31 +02:00
Jo-Philipp Wich
27b7e43180 lucihttp: update to latest HEAD
6ddea4c utils: fix crash with zero length input string in lh_header_attribute()
cb119de lib: add support for setting the maximum allowed data size

Fixes #1784.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-18 16:34:28 +02:00
pmelange
c2d3fe8a97 Removed retired nameserver 213.73.91.35 from the Freifunk profiles
See issue openwrt/luci#1757

Signed-off-by: Perry Melange <isprotejesvalkata@gmail.com>
2018-04-23 16:27:08 +02:00
Jo-Philipp Wich
5ef51b2abe lucihttp: update to latest HEAD
ccc685e lua: expose LH_URLDECODE_PLUS flag in Lua library

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-22 11:59:47 +02:00
Jo-Philipp Wich
efcca75678 lucihttp: update to latest HEAD
c7c9c66 src: extend multipart parser test program
5071efb testcases: add multipart parsing edge cases
689e3d0 lib: multipart-parser: fix various edge cases

Fixes #1754.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-20 11:30:09 +02:00
Jo-Philipp Wich
6abc488db3 freifunk-common: explicitely depend on libuci-lua
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-18 16:54:16 +02:00
Jo-Philipp Wich
06b85427f5 lucihttp: update to latest HEAD
8617997 lib: cast size_t values in printf() to prevent compielr warnings

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-18 16:38:49 +02:00
Jo-Philipp Wich
3f0abd936d lucihttp: update to latest HEAD
b7470d1 lua: back out early when instantiating parser with bad boundary
e1b1b1f testcases: remove stray .swp file
b46a6ca utils: introduce new LH_URLDECODE_PLUS flag

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-18 16:21:27 +02:00
Jo-Philipp Wich
084499a4c0 contrib: package liblucihttp
Package liblucihttp, a utility library providing HTTP parsing and data
decoding helpers.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-17 11:31:37 +02:00
Hannes Fuchs
d098a64e27 community-profiles: potsdam - changed SSID
After some discussion in our meetings and on the maling list we decided to
change the SSID to a fixed one.

Signed-off-by: Hannes Fuchs <hannes.fuchs@gmx.org>
2018-02-28 16:21:35 +01:00
Hannu Nyman
7edc6f03f0 freifunk-p2pblock / luci-app-p2pblock: remove from repo
Remove freifunk-p2pblock and luci-app-p2pblock as they have been BROKEN
since 2016. Packages depend on the removed l7-protocols as well as the
deprecated l7 support in the iptables kernel modules.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2018-01-20 15:49:44 +02:00
Joda Stößer
402ec9def5
community-profiles: remove Hannover 2018-01-09 11:31:55 +01:00
FreifunkUFO
1e0f42a848 meshwizard: upgrade version for some olsr-plugins
inside OLSR some plugins recently got newer version numbers (and of course improvements)
Signed-off-by: Ufo <ufo@rund.freifunk.net>
2017-10-21 21:56:21 +02:00
Hannes Fuchs
892398692c updated community-profile for potsdam
- fixed ssid
- disable IPv6
- added more interface settings
- added settings for 5GHz wifi
- added ssidscheme
- added dhcp leasetime setting
- added LinkQualityAlgorithm for olsrd

Signed-off-by: Hannes Fuchs <hannes.fuchs@gmx.org>
2017-03-01 11:05:52 +01:00
Hannu Nyman
04cf8763cc meshwizard: cleanup references to madwifi
Remove the code related to the deprecated madwifi driver.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2017-02-28 18:57:31 +02:00
Hannu Nyman
7ab9b5a714 freifunk-common: cleanup references to madwifi
Remove the code related to the deprecated madwifi driver.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2017-02-28 18:56:52 +02:00
Hannu Nyman
a225e4ac59 remote-update: remove ancient non-maintained package
Remove the ancient 'remote-update' package that has not been
updated for years. It e.g. references two non-existing targets.

Reference to discussion in #995

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2017-02-10 11:23:55 +02:00
Sven Roederer
12e82a3425 freifunk-common: bump version as of recent changes
the updates for olsr-0.9.5 compatibility should have changed the release-number

Signed-off-by: Sven Roederer <freifunk@it-solutions.geroedel.de>
2017-01-13 23:28:42 +01:00
Sven Roederer
52be91a249 community-profiles: update Berlin
since Kathleen-0.2.0 Release there is a new owm-api-url

Signed-off-by: Sven Roederer devel-sven@geroedel.de
2016-12-31 00:05:15 +01:00
Bastian Bittorf
8ca5d6da96 freifunk-common: neigh.sh: work also with unprettyfied JSON output
Older OLSRd-version outputs JSON humanreadable over multiple lines.
The introduced change in 524439cd16 broke
the output for those users. Fix that be a finer filter regex.
Thanks to Thomas Huehn <thomas@net.t-labs.tu-berlin.de> for spotting that.
2016-12-13 21:38:29 +01:00