Repository navigation
HaRP 0.4.8 checks the HTTP method of every request to an ExApp against the verbs of its routes, as AppAPI's ExApp proxy does, and decides routes on the request path as the ExApp reads it. The default setup needs no configuration change.
Upgrading
- When the verb check starts: AppAPI sends the route verbs from Nextcloud 35.0.3, 34.0.6, 33.0.11 and 32.0.16 on. Restart HaRP after updating Nextcloud, or disable and enable the ExApp, so that HaRP loads them. Until then HaRP matches routes by URL only, as before.
- ExApps: a method that no route of the path lists gets
405with anAllowheader;HEADis allowed whereverGETis. If the path read another way, for example in another letter case or without a trailing slash, matches a route with a higher access level, that level applies:/img/needs a login when^/img/.*is PUBLIC and.*is USER, and^/img(/.*)?$covers both. If an ExApp answers 405 or 403 after the upgrade, please report it to its author. - Custom
/haproxy.cfg: copy the newhttp-request return status 405line ofhaproxy.cfg.templateinto both frontends, otherwise these requests get 404. - Custom
spoe-agent.conf: addmethod=methodto the arguments ofexapps_msg, otherwise HaRP matches routes by URL only. Remove it before going back to an older HaRP, which answers 503 while it is there.
Changes
- The first route whose URL and verb match decides the access level and bruteforce protection. A method no route of the path lists gets 405 with
Allow, without an IP ban strike or a user lookup. Routes without a verb are matched by URL only (#149). - Routes are matched against the path decoded once and with
//merged; other readings of the path can only raise the access level (#152). - The forwarded path has escaped letters, digits and
-._~decoded,//merged, a raw\as%5Cand a%that starts no escape as%25; a path longer than 14 KiB once forwarded is refused. Requests from AppAPI keep their path (#152). .and..segments are refused in every spelling. Control characters and the/heartbeat,/initand/enabledendpoints in any spelling are refused unless AppAPI sends the request (#152).- README: route verbs and route paths for ExApp developers,
HEADonGETroutes in AppAPI's ExApp proxy, and a shorter README that links to the Nextcloud manuals (#149, #150, #152, #153, #155).