diff options
author | Gianni Ceccarelli <gianni.ceccarelli@net-a-porter.com> | 2013-10-01 14:14:31 +0000 |
---|---|---|
committer | Gianni Ceccarelli <gianni.ceccarelli@net-a-porter.com> | 2013-10-01 14:14:41 +0000 |
commit | 918db6301711e2ef9bb2d085b682ec552b1abf8b (patch) | |
tree | 296e189c12f853d25e79173ef5d849116458620f /media-sound/subsonic/files/no-license.patch | |
parent | compatibility with newer portage (diff) | |
download | gentoo-overlay-918db6301711e2ef9bb2d085b682ec552b1abf8b.tar.gz gentoo-overlay-918db6301711e2ef9bb2d085b682ec552b1abf8b.tar.bz2 gentoo-overlay-918db6301711e2ef9bb2d085b682ec552b1abf8b.zip |
subsonic ebuild
Diffstat (limited to 'media-sound/subsonic/files/no-license.patch')
-rw-r--r-- | media-sound/subsonic/files/no-license.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/media-sound/subsonic/files/no-license.patch b/media-sound/subsonic/files/no-license.patch new file mode 100644 index 0000000..a198a2a --- /dev/null +++ b/media-sound/subsonic/files/no-license.patch @@ -0,0 +1,44 @@ +Index: subsonic-main/src/main/java/net/sourceforge/subsonic/service/SettingsService.java +=================================================================== +--- subsonic-main/src/main/java/net/sourceforge/subsonic/service/SettingsService.java (revision 3501) ++++ subsonic-main/src/main/java/net/sourceforge/subsonic/service/SettingsService.java (working copy) +@@ -648,7 +648,7 @@ + if (email == null || license == null) {
+ return false;
+ }
+- return license.equalsIgnoreCase(StringUtil.md5Hex(email.toLowerCase()));
++ return true;
+ }
+
+ public LicenseInfo getLicenseInfo() {
+@@ -1250,29 +1250,7 @@ + }
+
+ licenseValidated = true;
+-
+- HttpClient client = new DefaultHttpClient();
+- HttpConnectionParams.setConnectionTimeout(client.getParams(), 120000);
+- HttpConnectionParams.setSoTimeout(client.getParams(), 120000);
+- HttpGet method = new HttpGet("http://subsonic.org/backend/validateLicense.view" + "?email=" + StringUtil.urlEncode(email) +
+- "&date=" + date.getTime() + "&version=" + versionService.getLocalVersion());
+- try {
+- ResponseHandler<String> responseHandler = new BasicResponseHandler();
+- String content = client.execute(method, responseHandler);
+- licenseValidated = content != null && content.contains("true");
+- if (!licenseValidated) {
+- LOG.warn("License key is not valid.");
+- }
+- String[] lines = StringUtils.split(content);
+- if (lines.length > 1) {
+- licenseExpires = new Date(Long.parseLong(lines[1]));
+- }
+-
+- } catch (Throwable x) {
+- LOG.warn("Failed to validate license.", x);
+- } finally {
+- client.getConnectionManager().shutdown();
+- }
++ return;
+ }
+
+ public synchronized void scheduleLicenseValidation() {
|