Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Fedora Infrastructure (http://www.linux-archive.org/fedora-infrastructure/)
-   -   Second Fix pkgdb (un)privileged operations for old python-bugzilla (http://www.linux-archive.org/fedora-infrastructure/670721-second-fix-pkgdb-un-privileged-operations-old-python-bugzilla.html)

Kevin Fenzi 05-24-2012 09:15 PM

Second Fix pkgdb (un)privileged operations for old python-bugzilla
 
On Thu, 24 May 2012 14:11:41 -0700
Toshio Kuratomi <a.badger@gmail.com> wrote:

> The change below broke bugz.fedoraproject.org.
>
> Backing out the change to the unprivileged user but leaving the
> privileged user change in appears to fix things (although we haven't
> tested everything as stg doesn't talk to bugzilla as much as
> production does.) Since bugz.fedoraproject.org is fairly visible,
> I'd like to apply the following hotfix to fix that. I'll alert the
> cvsadmin to let me know if this re-breaks processing of scmadmin
> requests.

Here's your +1 mallet of bugzilla wack a moling. :)

kevin
--
>
> diff --git a/modules/hotfix/files/pkgdb/utils.py
> b/modules/hotfix/files/pkgdb/utils.py index 8c121c5..ef0001b 100644
> --- a/modules/hotfix/files/pkgdb/utils.py
> +++ b/modules/hotfix/files/pkgdb/utils.py
> @@ -51,7 +51,7 @@ from cherrypy import request
> from sqlalchemy import select, and_
> from sqlalchemy.exceptions import DataError
>
> -from bugzilla import RHBugzilla3
> +from bugzilla import RHBugzilla3, Bugzilla
> import memcache
>
> # The Fedora Account System Module
> @@ -218,7 +218,7 @@ def get_unprivileged_bz():
> bz_server = config.get('bugzilla.queryurl',
> config.get('bugzilla.url', 'https://bugzilla.redhat.com'))
> bz_url = bz_server + '/xmlrpc.cgi'
> - _unpriv_bugzilla = RHBugzilla3(url=bz_url, cookiefile=None)
> + _unpriv_bugzilla = Bugzilla(url=bz_url, cookiefile=None)
> return _unpriv_bugzilla
>
> def get_bz():
>
> -Toshio
>
>
> > On Thu, 24 May 2012 08:01:28 -0700
> > Toshio Kuratomi <a.badger@gmail.com> wrote:
> >
> > >
> > > diff --git a/modules/hotfix/files/pkgdb/utils.py
> > > b/modules/hotfix/files/pkgdb/utils.py index 021a80f..8c121c5
> > > 100644 --- a/modules/hotfix/files/pkgdb/utils.py
> > > +++ b/modules/hotfix/files/pkgdb/utils.py
> > > @@ -51,7 +51,7 @@ from cherrypy import request
> > > from sqlalchemy import select, and_
> > > from sqlalchemy.exceptions import DataError
> > >
> > > -from bugzilla import Bugzilla
> > > +from bugzilla import RHBugzilla3
> > > import memcache
> > >
> > > # The Fedora Account System Module
> > > @@ -218,9 +218,8 @@ def get_unprivileged_bz():
> > > bz_server = config.get('bugzilla.queryurl',
> > > config.get('bugzilla.url', 'https://bugzilla.redhat.com'))
> > > bz_url = bz_server + '/xmlrpc.cgi'
> > > - _unpriv_bugzilla = Bugzilla(url=bz_url, cookiefile=None)
> > > + _unpriv_bugzilla = RHBugzilla3(url=bz_url, cookiefile=None)
> > > return _unpriv_bugzilla
> > > -
> > >
> > > def get_bz():
> > > 'Retrieve a connection to bugzilla
> > > @@ -236,7 +235,7 @@ def get_bz():
> > > bz_url = bz_server + '/xmlrpc.cgi'
> > > bz_user = config.get('bugzilla.user')
> > > bz_pass = config.get('bugzilla.password')
> > > - _bugzilla = Bugzilla(url=bz_url, user=bz_user,
> > > password=bz_pass,
> > > + _bugzilla = RHBugzilla3(url=bz_url, user=bz_user,
> > > password=bz_pass, cookiefile=None)
> > > return _bugzilla
> > >
> > >
> > > -Toshio
> >
> > +1
> > -sv
>
>

_______________________________________________
infrastructure mailing list
infrastructure@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/infrastructure

Ricky Elrod 05-24-2012 09:18 PM

Second Fix pkgdb (un)privileged operations for old python-bugzilla
 
On 05/24/2012 05:11 PM, Toshio Kuratomi wrote:
> The change below broke bugz.fedoraproject.org.
>
> Backing out the change to the unprivileged user but leaving the privileged
> user change in appears to fix things (although we haven't tested everything
> as stg doesn't talk to bugzilla as much as production does.) Since
> bugz.fedoraproject.org is fairly visible, I'd like to apply the following
> hotfix to fix that. I'll alert the cvsadmin to let me know if this
> re-breaks processing of scmadmin requests.
>
> diff --git a/modules/hotfix/files/pkgdb/utils.py b/modules/hotfix/files/pkgdb/utils.py
> index 8c121c5..ef0001b 100644
> --- a/modules/hotfix/files/pkgdb/utils.py
> +++ b/modules/hotfix/files/pkgdb/utils.py
> @@ -51,7 +51,7 @@ from cherrypy import request
> from sqlalchemy import select, and_
> from sqlalchemy.exceptions import DataError
>
> -from bugzilla import RHBugzilla3
> +from bugzilla import RHBugzilla3, Bugzilla
> import memcache
>
> # The Fedora Account System Module
> @@ -218,7 +218,7 @@ def get_unprivileged_bz():
> bz_server = config.get('bugzilla.queryurl', config.get('bugzilla.url',
> 'https://bugzilla.redhat.com'))
> bz_url = bz_server + '/xmlrpc.cgi'
> - _unpriv_bugzilla = RHBugzilla3(url=bz_url, cookiefile=None)
> + _unpriv_bugzilla = Bugzilla(url=bz_url, cookiefile=None)
> return _unpriv_bugzilla
>
> def get_bz():
>
> -Toshio


+1

_______________________________________________
infrastructure mailing list
infrastructure@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/infrastructure


All times are GMT. The time now is 08:27 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.