From de2d6a0303e0d6961dda59943cd779f04c1264e5 Mon Sep 17 00:00:00 2001 From: Brandon Date: Fri, 9 May 2014 10:53:56 -0700 Subject: [PATCH] /f/ security issue #722 --- LICENSE | 2 +- builds/appchan-x.user.js | 5 +++-- builds/crx/script.js | 5 +++-- src/Miscellaneous/Flash.coffee | 3 ++- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/LICENSE b/LICENSE index accaa5bc0..1a66558de 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ /* -* appchan x - Version 2.9.26 - 2014-05-07 +* appchan x - Version 2.9.26 - 2014-05-09 * * Licensed under the MIT license. * https://github.com/zixaphir/appchan-x/blob/master/LICENSE diff --git a/builds/appchan-x.user.js b/builds/appchan-x.user.js index 125f45d4c..0a93a9427 100644 --- a/builds/appchan-x.user.js +++ b/builds/appchan-x.user.js @@ -25,7 +25,7 @@ // ==/UserScript== /* -* appchan x - Version 2.9.26 - 2014-05-07 +* appchan x - Version 2.9.26 - 2014-05-09 * * Licensed under the MIT license. * https://github.com/zixaphir/appchan-x/blob/master/LICENSE @@ -15602,9 +15602,10 @@ } swfName = $('.fileText > a'); nav = $('.navLinks'); + swfName = swfName.href.replace(/^(.*?)\/f\//g, ""); sauceLink = $.el('a', { textContent: 'Check Sauce on SWFCHAN', - href: "http://eye.swfchan.com/search/?q=" + swfName.textContent + href: "http://eye.swfchan.com/search/?q=" + swfName }); $.addClass(nav, 'swfSauce'); $.rmClass(nav, 'navLinks'); diff --git a/builds/crx/script.js b/builds/crx/script.js index 5015a12c9..d595e5f5f 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -1,6 +1,6 @@ // Generated by CoffeeScript /* -* appchan x - Version 2.9.26 - 2014-05-07 +* appchan x - Version 2.9.26 - 2014-05-09 * * Licensed under the MIT license. * https://github.com/zixaphir/appchan-x/blob/master/LICENSE @@ -15622,9 +15622,10 @@ } swfName = $('.fileText > a'); nav = $('.navLinks'); + swfName = swfName.href.replace(/^(.*?)\/f\//g, ""); sauceLink = $.el('a', { textContent: 'Check Sauce on SWFCHAN', - href: "http://eye.swfchan.com/search/?q=" + swfName.textContent + href: "http://eye.swfchan.com/search/?q=" + swfName }); $.addClass(nav, 'swfSauce'); $.rmClass(nav, 'navLinks'); diff --git a/src/Miscellaneous/Flash.coffee b/src/Miscellaneous/Flash.coffee index c5ad7a978..fb3c2283b 100644 --- a/src/Miscellaneous/Flash.coffee +++ b/src/Miscellaneous/Flash.coffee @@ -10,9 +10,10 @@ Flash = swfName = $ '.fileText > a' nav = $ '.navLinks' + swfName = swfName.href.replace /^(.*?)\/f\//g, "" sauceLink = $.el 'a', textContent: 'Check Sauce on SWFCHAN' - href: "http://eye.swfchan.com/search/?q=#{swfName.textContent}" + href: "http://eye.swfchan.com/search/?q=#{swfName}" $.addClass nav, 'swfSauce' $.rmClass nav, 'navLinks' $.rmAll nav