[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#955268: udd watch: "429 too many requests" from GitHub



On 29/03/20 at 23:52 +0200, Adam Borowski wrote:
> On Sun, Mar 29, 2020 at 05:53:11PM +0200, Xavier wrote:
> > >>> IIRC with an access token the limit is 5000 queries per hour.  Without a
> > >>> token, much, much less.
> > >>
> > >> The UDD code calls uscan. Is there a way for uscan to use an access
> > >> token?
> > > 
> > > not for now, but I can add this feature. Just to insert an additional
> > > header ?
> > 
> > This little diff adds --http-header option. To use it:
> > 
> > uscan --http-header=Access-Token=qwertyuiop
> > 
> > Sounds good for you ?

Yes, thanks!

> Tokens hardly ever are portable between sites, thus I guess they'd need to
> be used only for matching URLs.  I'm not sure if udd already parses target
> servers or calls uscan as-is, letting it do all the work.
> 
> Second issue is, tokens are (initially) an user-"password" pair that
> requires further processing.  For example, GitHub uses Basic http auth
> (https://developer.github.com/v3/auth/).  If I read the RFC
> (https://www.ietf.org/rfc/rfc2617.txt) correctly, Basic auth gets mangled
> into a header and is sent as-is; no idea if other token-using webservices
> use fancier auth schemes.  Even if just Basic is used, it might be simpler
> to not require the user how to do the mangling.

In the UDD case, I think that's enough to fix the present issue.

I'm not sure something more general should be done?

Lucas


Reply to: