[aur-dev] [PATCH v4] Fake pkgbase actions for unconfirmed users
Gordian Edenhofer
gordian.edenhofer at gmail.com
Sat Jun 27 13:09:35 UTC 2015
On Sat, 2015-06-27 at 11:11 +0200, Lukas Fleischer wrote:
> 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.
My fault! Though I still don't get why one should set this parameter,
espicially because it is contained in the $_SERVER['HTTP_REFERER'] and
would be properly set either way.
>
> > [...]
> > +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!
Feel free to use your version. I am glad that this feature is being
added.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <https://lists.archlinux.org/pipermail/aur-dev/attachments/20150627/58a83e31/attachment.asc>
More information about the aur-dev
mailing list