benoit sigoure lwzbplrdeepitafr news mention change buildbotstatuswebbasewebpy webstatus__init__ adjust also accept string userpass argument webstatus_auth_htpasswd new webstatusauthuser use new method htpasswdstyle authentication used docsbuildbottexinfo webstatus configuration parameters document new feature signedoffby benoit sigoure news 3 buildbotstatuswebbasewebpy 62 docsbuildbottexinfo 3 3 files changed 53 insertions 15 deletions diff git anews bnews index d136cf77d4496b 100644 anews bnews 117 118 user visible changes buildbot outline webstatus constructor take list loginpassword optional userpass argument pretty much way try_userpass users valid loginpassword forcestop builds webstatus webstatus alternatively userpass argument string contains path htpasswdstyle file use authenticate users release 076 30 sep 2007 diff git abuildbotstatuswebbasewebpy bbuildbotstatuswebbasewebpy index 5755140d8a8448 100644 abuildbotstatuswebbasewebpy bbuildbotstatuswebbasewebpy 3537 3537 class webstatusservicemultiservice changes def __init__self http_portnone distrib_portnone allowforcefalse userpass userpassnone run web server provides buildbot status type http_port int ltwistedapplicationstrports string 38812 38815 class webstatusservicemultiservice strports parser param allowforce boolean true webserver allow visitors trigger cancel builds rtpw userpass list string string tuples rtpw userpass list string string tuples string param userpass list loginpassword pairs restrain access callowforce features ignored callowforce true dont pass list userpasswords legacy behavior used people forcestop builds without auth cuserpass string assumed path htpasswdstyle file used authenticate users servicemultiservice__init__self 40817 41125 class webstatusservicemultiservice selfdistrib_port distrib_port selfallowforce allowforce allowforce userpass user_pass_pair userpass assert isinstanceuser_pass_pair tuple login password user_pass_pair assert isinstancelogin str assert isinstancepassword str isinstanceuserpass str selfauth_type htpasswd import os assert ospathexistsuserpass elif isinstanceuserpass list selfauth_type simple user_pass_pair userpass assert isinstanceuser_pass_pair tuple login password user_pass_pair assert isinstancelogin str assert isinstancepassword str else raise typeerroruserpass invalid type selfuserpass userpass else userpass logmsgwarning discarding list userpasswords must also set allowforce true use selfuserpass selfuserpass none replaced weve attached parent thus basedir reference basedirpublic_html 5276 53823 class webstatusservicemultiservice return true return false def _auth_htpasswdself login password authenticate clogin cpassword htpasswdstyle file fetch lines htpasswd file split login password array lines lrstripsplit 1 l fileselfuserpassreadlines keep line login lines l l lines l0 login lines return false deshash password first two characters salt used introduce disorder des algorithm hash lines01 crypt import crypt return hash cryptpassword hash02 def authuserself login password check loginpassword valid userpassword pair allowed perform privileged action webstatus 53411 56219 class webstatusservicemultiservice approach selfuserpass return false l p selfuserpass login l password p return true logmsgauthentication failed ss login password return false res false selfauth_type htpasswd res self_auth_htpasswdlogin password else basic authentication list loginpassword l p selfuserpass login l password p res true res logmsgauthentication failed ss login password return res def getportnumself benefit unit tests diff git adocsbuildbottexinfo bdocsbuildbottexinfo index 7086f965cf9d17 100644 adocsbuildbottexinfo bdocsbuildbottexinfo 60677 60678 installed time previous build default value false may wish allow strangers cause build run stop current builds case pass list pair loginpassword codeuserpass argument codeuserpass argument alternatively argument string contains path filehtpasswdstyle file use authenticate users node buildbot web resources xmlrpc server webstatus configuration parameters webstatus 1535654gdd5ec fri 08 aug 2008 093747 0100 buildbotdevel patch 1111 allow authentication work htpasswdstyle files