DrTrigon has submitted this change and it was merged.
Change subject: DRTRIGON-133; support of coming https security upgrade
......................................................................
DRTRIGON-133; support of coming https security upgrade
Change-Id: I4c8f02c3d014fd7f28a036e2739ac30e92973e22
---
M public_html/cgi-bin/sum_cat_disc.py
1 file changed, 6 insertions(+), 3 deletions(-)
Approvals:
DrTrigon: Verified; Looks good to me, approved
diff --git a/public_html/cgi-bin/sum_cat_disc.py
b/public_html/cgi-bin/sum_cat_disc.py
index a4ccefe..0c76104 100755
--- a/public_html/cgi-bin/sum_cat_disc.py
+++ b/public_html/cgi-bin/sum_cat_disc.py
@@ -184,7 +184,7 @@
lang,
CONCAT("sql-s", server) AS dbserver,
dbname,
- CONCAT("http://", DOMAIN, script_path, "api.php") AS url
+ CONCAT("//", DOMAIN, script_path, "api.php") AS url
FROM toolserver.wiki
WHERE family = "wikipedia"
ORDER BY SIZE DESC LIMIT %s;"""
@@ -313,6 +313,8 @@
lang = locale.locale_alias.get(wiki,
locale.locale_alias['en']).split('.')[0]
locale.setlocale(locale.LC_TIME, lang)
+ #scheme = {'NO': 'http', 'YES':
'https'}[os.environ.get('HTTP_X_TS_SSL', 'NO')]
+
s = datetime.datetime.strptime(start, wikitime)
p = datetime.timedelta(hours=int(period))
end = s - p
@@ -354,7 +356,7 @@
data['output'] += "<tr>\n <td>"
title = subrow[0][0]
title =
site.namespace(subrow[0][1]).encode('utf8') + ':' + title
- data['output'] += '<a
href="http://%s.wikipedia.org/wiki/%s" target="_blank">%s</a>' % (wiki, title,
title.replace('_', ' '))
+ data['output'] += '<a
href="//%s.wikipedia.org/wiki/%s" target="_blank">%s</a>' % (wiki, title,
title.replace('_', ' '))
data['output'] += "</td>\n <td>"
# data['output'] += str(subrow[0][1:])
try:
@@ -363,7 +365,7 @@
tmsp = subrow[0][2] + " (!)"
data['output'] += tmsp
data['output'] += "</td>\n <td>"
- data['output'] += '<a
href="http://%s.wikipedia.org/wiki/User:%s" target="_blank">%s</a>' % (wiki,
subrow[0][3], subrow[0][3])
+ data['output'] += '<a
href="//%s.wikipedia.org/wiki/User:%s" target="_blank">%s</a>' % (wiki,
subrow[0][3], subrow[0][3])
data['output'] += "</td>\n <td>"
data['output'] += subrow[0][4]
data['output'] += "</td>\n</tr>\n"
@@ -384,6 +386,7 @@
'refresh': '',
'tsnotice': style.print_tsnotice(),
'p-status': '<tr><td><small><a
href="http://status.toolserver.org/" target="_blank">DB
status</a></small></td></tr>',
+ #'p-status': '<tr><td><small><a
href="//status.toolserver.org/" target="_blank">DB
status</a></small></td></tr>',
'footer': style.footer + style.footer_w3c, # wiki
(new) not CSS 2.1 compilant
'wiki': wiki,
'cat': cgi.escape( cat, quote=True), #
proper XSS secure output
--
To view, visit https://gerrit.wikimedia.org/r/85521
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I4c8f02c3d014fd7f28a036e2739ac30e92973e22
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/bots/drtrigonbot
Gerrit-Branch: master
Gerrit-Owner: DrTrigon <[email protected]>
Gerrit-Reviewer: DrTrigon <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits