commit:     1754b6bf47364d27c67d95fd3f9a93955d0de138
Author:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 22 04:19:18 2016 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Tue Nov 22 04:19:18 2016 +0000
URL:        https://gitweb.gentoo.org/proj/rbot-gentoo.git/commit/?id=1754b6bf

!support: allow optional "GLSA " prefix.

Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>

 gentoo-data.rb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gentoo-data.rb b/gentoo-data.rb
index f536e44..f0aa5f0 100644
--- a/gentoo-data.rb
+++ b/gentoo-data.rb
@@ -229,6 +229,7 @@ class GentooPlugin < Plugin
   end
 
   def glsa(m, params)
+    id = params[:glsa_id].gsub(/^(GLSA *)?/i,'')
     source = GLSA_SRC.sub('@GLSA_ID@', params[:glsa_id])
     res = fetch_file_or_url(source)
     if res
@@ -402,7 +403,7 @@ plugin.default_auth( 'view', true )
 REGEX_CP = /^(?:[-[:alnum:]]+\/)?[-+_[:alnum:]]+$/
 REGEX_DEV = /^[-._[:alnum:]]+$/
 REGEX_PROJECT = /^[-_@.[:alnum:]]+$/
-REGEX_GLSA = /^[-1234567890]+$/
+REGEX_GLSA = /^(GLSA ?)?[-1234567890]+$/i
 
 plugin.map 'meta -v :pkg',
   :requirements => {

Reply via email to