(whimsy) branch master updated: Default to showing transitive references separately
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 8bb0d446 Default to showing transitive references separately 8bb0d446 is described below commit 8bb0d446c3516f76d376f22504cbfabc909b7763 Author: Sebb AuthorDate: Sat Apr 20 15:05:13 2024 +0100 Default to showing transitive references separately --- www/members/page-scanner.cgi | 31 +++ 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/www/members/page-scanner.cgi b/www/members/page-scanner.cgi index 0df899c8..6bda8d67 100755 --- a/www/members/page-scanner.cgi +++ b/www/members/page-scanner.cgi @@ -10,13 +10,14 @@ require_relative '../../tools/asf-site-check' print "Content-type: text/plain; charset=UTF-8\r\n\r\n" -# puts ENV['REQUEST_URI'] +DIVIDER=' <= ' + qs = ENV['QUERY_STRING'] if qs =~ %r{^url=(https?://[^&]+)(?:&(.+))?} url = $1 option = $2 # we only want full URLs - option = 'all' unless option == 'showurl' + option = 'allref' unless %w{all showurl}.include? option print "Checking the page #{url}\n\n" puts "The following references were found to hosts other than apache.org and apachecon.com" puts "The first column shows if the host is recognised as being under ASF control according to" @@ -25,9 +26,31 @@ if qs =~ %r{^url=(https?://[^&]+)(?:&(.+))?} cmd = ['node', '/srv/whimsy/tools/scan-page.js', url, option] out, err, status = Open3.capture3(*cmd) if status.success? +if out == '' + puts "No external references found" +else + puts "Top-level references:" +end +extras = Hash.new {|h,k| h[k] = Hash.new} out.split("\n").each do |url| - print ASFDOMAIN.asfurl?(url) ? 'OK ' : 'NO ' - puts url + p1, p2 = url.split(DIVIDER) + if p2 +extras[p2][p1]=1 + else +print ASFDOMAIN.asfurl?(url) ? 'OK ' : 'NO ' +puts url + end +end +if extras.size > 0 + puts "" + puts "Transitive references:" + extras.each do |k, v| +puts "Loaded by: "+k +v.each do |url,_| + print ASFDOMAIN.asfurl?(url) ? 'OK ' : 'NO ' + puts url + end + end end else puts err.scan(/^Error:.+/).first || err # Show only the Error line if present
(whimsy) branch master updated: Option to show initiator
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 51660fb3 Option to show initiator 51660fb3 is described below commit 51660fb3a6b1708b9ae6e7f5269792ac75226ca4 Author: Sebb AuthorDate: Sat Apr 20 15:04:14 2024 +0100 Option to show initiator --- tools/scan-page.js | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/scan-page.js b/tools/scan-page.js index f91107ce..6aa31787 100755 --- a/tools/scan-page.js +++ b/tools/scan-page.js @@ -6,7 +6,7 @@ module.paths.push('/usr/lib/node_modules') const puppeteer = require('puppeteer'); -const target = process.argv[2] || 'http://apache.org/'; +const target = process.argv[2] || 'https://apache.org/'; const inithost = new URL(target).host; const option = process.argv[3] || ''; @@ -40,6 +40,14 @@ if (!isASFhost(inithost)) { if (option == 'all') { console.log(url); interceptedRequest.continue(); +} else if (option == 'allref') { + let iniurl = interceptedRequest.initiator().url; + if (iniurl && !iniurl.startsWith(target)) { // second level +console.log(url + ' <= ' + iniurl); + } else { +console.log(url); + } + interceptedRequest.continue(); } else { if (option == 'showurl') { console.log(url);
(whimsy) branch master updated: selfserve page was renamed
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new d1bc1b82 selfserve page was renamed d1bc1b82 is described below commit d1bc1b82946f04b8bc361f2f9f36dda9031a2387 Author: Sebb AuthorDate: Sat Apr 20 11:39:34 2024 +0100 selfserve page was renamed --- docker-config/whimsy.conf | 2 +- www/officers/index.cgi| 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-config/whimsy.conf b/docker-config/whimsy.conf index 9072a420..2f3cf6ed 100644 --- a/docker-config/whimsy.conf +++ b/docker-config/whimsy.conf @@ -101,7 +101,7 @@ RedirectMatch permanent ^/secmail /secretary/workbench RedirectMatch permanent ^/officers/public_names /secretary/public-names # redirect obsolete mailing list request form to replacement application -RedirectMatch permanent ^/officers/mlreq https://selfserve.apache.org/mail.html +RedirectMatch permanent ^/officers/mlreq https://selfserve.apache.org/mailinglist-new.html ProxyPass "/board/agenda/websocket/" "ws://localhost:34234/" diff --git a/www/officers/index.cgi b/www/officers/index.cgi index 7ce369dc..ee3eadc9 100755 --- a/www/officers/index.cgi +++ b/www/officers/index.cgi @@ -11,7 +11,7 @@ OFFICERS = { '/board/agenda' => "Monthly Board Agenda Tool", 'acreq.cgi' => "New Account Request Helper", 'unlistedclas.cgi' => "Unlisted CLAs (prospective committers)", - 'mlreq.cgi' => "New Mailing List Request Form", + 'https://selfserve.apache.org/mailinglist-new.html' => "New Mailing List Request Form", '/committers/subscribe.cgi' => "Apache Mailing List Subscription/Unsubscription Tool", '/board/subscriptions' => "PMC Chair board@ Subscription Crosscheck", 'list-traffic.cgi' => "Statistics About The board@ Mailing List",