[aur-dev] [PATCH v4] Fake pkgbase actions for unconfirmed users

Lukas Fleischer lfleischer at archlinux.org
Sat Jun 27 09:11:23 UTC 2015


On Fri, 26 Jun 2015 at 21:03:17, Gordian Edenhofer wrote:
> Displaying flag, notify, vote, adopt and file request links for
> users which did not authenticate themselves and letting those fake
> buttons link to the login page.
> 
> Signed-off-by: Gordian Edenhofer <gordian.edenhofer at gmail.com>
> ---
> Here you go!
> 
>  web/lib/aur.inc.php              | 35 ++++++++++++++++++++++++-----------
>  web/template/pkgbase_actions.php | 26 ++++++++++++--------------
>  2 files changed, 36 insertions(+), 25 deletions(-)
> [...]
> +               $code = '<a href="' . get_uri('/login/', true) . '?referer=';
> +               $code .= urlencode($uri) . '">';

Oh, seems like this doesn't work... We need an absolute URI here.

> [...]
> +function html_action_form($uri, $action, $desc, $uid) {
> [...]
> +               $code = '<a href="' . get_uri('/login/', true) . '?referer=';
> +               $code .= urlencode($uri) . '">';

I don't think we should set the referer here. These actions require an
HTTP POST request.

> [...]
> diff --git a/web/template/pkgbase_actions.php b/web/template/pkgbase_actions.php
> index a659c88..9675d3a 100644
> --- a/web/template/pkgbase_actions.php
> +++ b/web/template/pkgbase_actions.php
> [...]

The pkgbase_actions hunks did not apply cleanly for some reason. Instead
of trying to fix that, I applied a slightly modified version. I will
submit it for review in a minute.

Thanks!


More information about the aur-dev mailing list