You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ma...@apache.org on 2018/10/14 15:24:31 UTC
svn commit: r1843842 -
/openoffice/ooo-site/trunk/content/download/download.js
Author: marcus
Date: Sun Oct 14 15:24:30 2018
New Revision: 1843842
URL: http://svn.apache.org/viewvc?rev=1843842&view=rev
Log:
Disable MD5 links for new releases. Additionally show a link in which Linux distributions RPM and DEB packages are used.
Modified:
openoffice/ooo-site/trunk/content/download/download.js
Modified: openoffice/ooo-site/trunk/content/download/download.js
URL: http://svn.apache.org/viewvc/openoffice/ooo-site/trunk/content/download/download.js?rev=1843842&r1=1843841&r2=1843842&view=diff
==============================================================================
--- openoffice/ooo-site/trunk/content/download/download.js (original)
+++ openoffice/ooo-site/trunk/content/download/download.js Sun Oct 14 15:24:30 2018
@@ -51,7 +51,6 @@ DL.init = function( release_mode ) {
DL.setOSSelection();
DL.setLanguageSelection();
DL.setVersionSelection();
-
// When release mode = 2, it is a beta release. Otherwise assume "stable release" as default.
if( release_mode === 2 ) {
@@ -73,14 +72,14 @@ DL.initVariables = function( init_all )
// The following are used in "download.js". and "index.html".
// All elements with ID in the sub-box.
- DL.ID_SUB_BOX = [ "dl_rel_info", "dl_f_info", "dl_f_chk_keys", "space1",
- "dl_f_chk_asc", "space2", "dl_f_chk_md5", "space3", "dl_f_chk_sha256", "dl_lp_info", "dl_lp_chk_keys", "space4",
- "dl_lp_chk_asc", "space5", "dl_lp_chk_md5", "space6", "dl_lp_chk_sha256", "dl_hlp_img", "dl_hlp", "dl_chk_img",
- "dl_chk", "dl_rpt_img", "dl_rpt" ];
+ DL.ID_SUB_BOX = [ "dl_rel_info", "dl_f_info", "dl_f_chk_keys", "space1", "dl_f_chk_asc", "space2", "dl_f_chk_sha256", "space3",
+ "dl_f_chk_sha512", "space4", "dl_f_chk_md5", "dl_lp_info", "dl_lp_chk_keys", "space5", "dl_lp_chk_asc", "space6", "dl_lp_chk_sha256",
+ "space7", "dl_lp_chk_sha512", "space8", "dl_lp_chk_md5", "dl_hlp_img", "dl_hlp", "dl_chk_img", "dl_chk", "dl_rpt_img",
+ "dl_rpt" ];
// All elements with ID in the box and sub-box that have a link.
- DL.ID_LINKS = [ "dl_f_link", "dl_lp_link", "dl_rel_notes", "dl_f_chk_keys", "dl_f_chk_asc", "dl_f_chk_md5",
- "dl_f_chk_sha256", "dl_lp_chk_keys", "dl_lp_chk_asc", "dl_lp_chk_md5", "dl_lp_chk_sha256", "dl_hlp", "dl_chk",
+ DL.ID_LINKS = [ "dl_f_link", "dl_lp_link", "dl_rel_notes", "dl_f_chk_keys", "dl_f_chk_asc", "dl_f_chk_sha256", "dl_f_chk_sha512",
+ "dl_f_chk_md5", "dl_lp_chk_keys", "dl_lp_chk_asc", "dl_lp_chk_sha256", "dl_lp_chk_sha512", "dl_lp_chk_md5", "dl_hlp", "dl_chk",
"dl_rpt" ];
// The following are used in "download.js" only.
@@ -111,6 +110,7 @@ DL.initVariables = function( init_all )
DL.FILESIZE_FULL = -1; // The filesize of the download file (full install).
DL.FILESIZE_LP = -1; // The filesize of the download file (langpack).
DL.EXTENSION = ""; // The file extension of the download URL.
+ DL.INSTALL_EXTENSION = ""; // The file extension of the installation.
DL.SF_BASE_URL = ""; // The base URL for all binary files on Sourceforge.
DL.SF_PREV_URL = ""; // The base URL for all binary files (prev. version) on Sourceforge.
DL.ASF_ARC_BASE_URL = ""; // The base URL for all checksum files on Apache Archive server.
@@ -120,11 +120,13 @@ DL.initVariables = function( init_all )
DL.LINK_LP = ""; // The complete download URL (langpack).
DL.LINK_CHK_KEYS = ""; // The KEYS file as download URL.
DL.LINK_CHK_ASC_FULL = ""; // The ASC file as download URL (full install).
- DL.LINK_CHK_MD5_FULL = ""; // The MD5 file as download URL (full install).
DL.LINK_CHK_SHA256_FULL = ""; // The SHA256 file as download URL (full install).
+ DL.LINK_CHK_SHA512_FULL = ""; // The SHA512 file as download URL (full install).
+ DL.LINK_CHK_MD5_FULL = ""; // The MD5 file as download URL (full install).
DL.LINK_CHK_ASC_LP = ""; // The ASC file as download URL (langpack).
- DL.LINK_CHK_MD5_LP = ""; // The MD5 file as download URL (langpack).
DL.LINK_CHK_SHA256_LP = ""; // The SHA256 file as download URL (langpack).
+ DL.LINK_CHK_SHA512_LP = ""; // The SHA512 file as download URL (langpack).
+ DL.LINK_CHK_MD5_LP = ""; // The MD5 file as download URL (langpack).
DL.SHOW_SUB_BOX = true; // Is the download URL OK to show the sub-box (true) or not (false)?
DL.ERROR = false; // Is the download URL in general OK (false) or not (true)?
@@ -459,6 +461,12 @@ DL.getOSSelection = function() {
DL.PLATFORM_SEL = DL.SEL_OS[ i ];
DL.UI_PLATFORM = DL.SEL_OS[ i + 1 ];
DL.EXTENSION = DL.SEL_OS[ i + 2 ];
+
+ if( DL.UI_PLATFORM.indexOf( "EXE" ) !== -1 ) DL.INSTALL_EXTENSION = "EXE";
+ if( DL.UI_PLATFORM.indexOf( "RPM" ) !== -1 ) DL.INSTALL_EXTENSION = "RPM";
+ if( DL.UI_PLATFORM.indexOf( "DEB" ) !== -1 ) DL.INSTALL_EXTENSION = "DEB";
+ if( DL.UI_PLATFORM.indexOf( "DMG" ) !== -1 ) DL.INSTALL_EXTENSION = "DMG";
+
break;
}
}
@@ -682,7 +690,7 @@ DL.checkForLinkExceptions = function() {
}
// If version is '4.1.0' (or newer) and platform is 'Mac OS X <= 10.6', show the none-availability to the user.
- if( ( DL.VERSION_SEL === "4.1.5" || DL.VERSION_SEL === "4.1.4" || DL.VERSION_SEL === "4.1.3" || DL.VERSION_SEL === "4.1.2" || DL.VERSION_SEL === "4.1.1" || DL.VERSION_SEL === "4.1.0" ) && DL.PLATFORM === "mac32" ) {
+ if( ( DL.VERSION_SEL === "4.1.4" || DL.VERSION_SEL === "4.1.3" || DL.VERSION_SEL === "4.1.2" || DL.VERSION_SEL === "4.1.1" || DL.VERSION_SEL === "4.1.0" ) && DL.PLATFORM === "mac32" ) {
// Show an error message that the chosen items do not lead to a download.
// If a customized string is not available in the "msg_prop_l10n_XX.js" file.
@@ -814,17 +822,30 @@ DL.getLinkSelection = function() {
// Assign the checksum links: Base link + language + file name.
DL.LINK_CHK_KEYS = DL.ASF_DIST + "KEYS";
DL.LINK_CHK_ASC_FULL = DL.ASF_ARC_BASE_URL + "/binaries/" + DL.LANG_SEL + "/" + DL.FILENAME_FULL + ".asc";
- DL.LINK_CHK_MD5_FULL = DL.ASF_ARC_BASE_URL + "/binaries/" + DL.LANG_SEL + "/" + DL.FILENAME_FULL + ".md5";
DL.LINK_CHK_SHA256_FULL = DL.ASF_ARC_BASE_URL + "/binaries/" + DL.LANG_SEL + "/" + DL.FILENAME_FULL + ".sha256";
+ DL.LINK_CHK_SHA512_FULL = DL.ASF_ARC_BASE_URL + "/binaries/" + DL.LANG_SEL + "/" + DL.FILENAME_FULL + ".sha512";
+// DL.LINK_CHK_MD5_FULL = DL.ASF_ARC_BASE_URL + "/binaries/" + DL.LANG_SEL + "/" + DL.FILENAME_FULL + ".md5";
DL.LINK_CHK_ASC_LP = DL.ASF_ARC_BASE_URL + "/binaries/" + DL.LANG_SEL + "/" + DL.FILENAME_LP + ".asc";
- DL.LINK_CHK_MD5_LP = DL.ASF_ARC_BASE_URL + "/binaries/" + DL.LANG_SEL + "/" + DL.FILENAME_LP + ".md5";
DL.LINK_CHK_SHA256_LP = DL.ASF_ARC_BASE_URL + "/binaries/" + DL.LANG_SEL + "/" + DL.FILENAME_LP + ".sha256";
+ DL.LINK_CHK_SHA512_LP = DL.ASF_ARC_BASE_URL + "/binaries/" + DL.LANG_SEL + "/" + DL.FILENAME_LP + ".sha512";
+// DL.LINK_CHK_MD5_LP = DL.ASF_ARC_BASE_URL + "/binaries/" + DL.LANG_SEL + "/" + DL.FILENAME_LP + ".md5";
// Indicate that a download will successfull.
DL.SHOW_SUB_BOX = true;
DL.ERROR = false;
+ // If a Linux file is selected, then set the values for the RPM vs. DEB text link. Otherwise no text.
+ if( DL.INSTALL_EXTENSION === "RPM" || DL.INSTALL_EXTENSION === "DEB" ) {
+ document.getElementById( "dl_rpm_vs_deb" ).style.cursor = "help";
+ document.getElementById( "dl_rpm_vs_deb" ).title = l10n.dl_rpm_vs_deb_title;
+ document.getElementById( "dl_rpm_vs_deb" ).text = l10n.dl_rpm_vs_deb_text;
+ } else {
+ document.getElementById( "dl_rpm_vs_deb" ).style.cursor = "default";
+ document.getElementById( "dl_rpm_vs_deb" ).title = "";
+ document.getElementById( "dl_rpm_vs_deb" ).text = "";
+ }
+
// Set the values for both download text buttons and set the focus to the "full install".
document.getElementById( "dl_f_link" ).href = DL.LINK_FULL;
document.getElementById( "dl_f_link" ).innerHTML = l10n.dl_full_link_text;
@@ -855,13 +876,17 @@ DL.getLinkSelection = function() {
document.getElementById( "dl_f_chk_asc" ).innerHTML = l10n.dl_checksum_asc_text;
document.getElementById( "dl_f_chk_asc" ).title = l10n.dl_checksum_asc_title + DL.FILENAME_FULL;
document.getElementById( "space2" ).innerHTML = " , ";
- document.getElementById( "dl_f_chk_md5" ).href = DL.LINK_CHK_MD5_FULL;
- document.getElementById( "dl_f_chk_md5" ).innerHTML = l10n.dl_checksum_md5_text;
- document.getElementById( "dl_f_chk_md5" ).title = l10n.dl_checksum_md5_title + DL.FILENAME_FULL;
- document.getElementById( "space3" ).innerHTML = " , ";
document.getElementById( "dl_f_chk_sha256" ).href = DL.LINK_CHK_SHA256_FULL;
document.getElementById( "dl_f_chk_sha256" ).innerHTML = l10n.dl_checksum_sha256_text;
document.getElementById( "dl_f_chk_sha256" ).title = l10n.dl_checksum_sha256_title + DL.FILENAME_FULL;
+ document.getElementById( "space3" ).innerHTML = " , ";
+ document.getElementById( "dl_f_chk_sha512" ).href = DL.LINK_CHK_SHA512_FULL;
+ document.getElementById( "dl_f_chk_sha512" ).innerHTML = l10n.dl_checksum_sha512_text;
+ document.getElementById( "dl_f_chk_sha512" ).title = l10n.dl_checksum_sha512_title + DL.FILENAME_FULL;
+// document.getElementById( "space4" ).innerHTML = " , ";
+// document.getElementById( "dl_f_chk_md5" ).href = DL.LINK_CHK_MD5_FULL;
+// document.getElementById( "dl_f_chk_md5" ).innerHTML = l10n.dl_checksum_md5_text;
+// document.getElementById( "dl_f_chk_md5" ).title = l10n.dl_checksum_md5_title + DL.FILENAME_FULL;
// #3 Langpack: Data and links
document.getElementById( "dl_lp_info" ).innerHTML = "<b>" + l10n.dl_headline_langpack_text
@@ -871,18 +896,22 @@ DL.getLinkSelection = function() {
document.getElementById( "dl_lp_chk_keys" ).href = DL.LINK_CHK_KEYS;
document.getElementById( "dl_lp_chk_keys" ).innerHTML = l10n.dl_checksum_keys_text;
document.getElementById( "dl_lp_chk_keys" ).title = l10n.dl_checksum_keys_title;
- document.getElementById( "space4" ).innerHTML = " , ";
+ document.getElementById( "space5" ).innerHTML = " , ";
document.getElementById( "dl_lp_chk_asc" ).href = DL.LINK_CHK_ASC_LP;
document.getElementById( "dl_lp_chk_asc" ).innerHTML = l10n.dl_checksum_asc_text;
document.getElementById( "dl_lp_chk_asc" ).title = l10n.dl_checksum_asc_title + DL.FILENAME_LP;
- document.getElementById( "space5" ).innerHTML = " , ";
- document.getElementById( "dl_lp_chk_md5" ).href = DL.LINK_CHK_MD5_LP;
- document.getElementById( "dl_lp_chk_md5" ).innerHTML = l10n.dl_checksum_md5_text;
- document.getElementById( "dl_lp_chk_md5" ).title = l10n.dl_checksum_md5_title + DL.FILENAME_LP;
document.getElementById( "space6" ).innerHTML = " , ";
document.getElementById( "dl_lp_chk_sha256" ).href = DL.LINK_CHK_SHA256_LP;
document.getElementById( "dl_lp_chk_sha256" ).innerHTML = l10n.dl_checksum_sha256_text;
document.getElementById( "dl_lp_chk_sha256" ).title = l10n.dl_checksum_sha256_title + DL.FILENAME_LP;
+ document.getElementById( "space7" ).innerHTML = " , ";
+ document.getElementById( "dl_lp_chk_sha512" ).href = DL.LINK_CHK_SHA512_LP;
+ document.getElementById( "dl_lp_chk_sha512" ).innerHTML = l10n.dl_checksum_sha512_text;
+ document.getElementById( "dl_lp_chk_sha512" ).title = l10n.dl_checksum_sha512_title + DL.FILENAME_LP;
+// document.getElementById( "space8" ).innerHTML = " , ";
+// document.getElementById( "dl_lp_chk_md5" ).href = DL.LINK_CHK_MD5_LP;
+// document.getElementById( "dl_lp_chk_md5" ).innerHTML = l10n.dl_checksum_md5_text;
+// document.getElementById( "dl_lp_chk_md5" ).title = l10n.dl_checksum_md5_title + DL.FILENAME_LP;
// #4 Links: Full vs. lp + verify checksums + report broken link.
document.getElementById( "dl_hlp_img" ).src = l10n.dl_help_img_src;
@@ -904,6 +933,34 @@ DL.getLinkSelection = function() {
document.getElementById( "dl_rpt" ).innerHTML = l10n.dl_report_text;
document.getElementById( "dl_rpt" ).title = l10n.dl_report_title;
+ // New Apache release policy since March 2018: Do not provide any MD5 checksums anymore as it is understood as too insecure.
+ if( ( DL.VERSION_SEL === "4.1.6" || DL.VERSION_SEL === "4.2.0" ) ) {
+ // If version is '4.1.6' (or newer), do not show any MD5 checksum file links.
+ document.getElementById( "space4" ).innerHTML = "";
+ document.getElementById( "dl_f_chk_md5" ).href = "";
+ document.getElementById( "dl_f_chk_md5" ).innerHTML = "";
+ document.getElementById( "dl_f_chk_md5" ).title = "";
+
+ document.getElementById( "space8" ).innerHTML = "";
+ document.getElementById( "dl_lp_chk_md5" ).href = "";
+ document.getElementById( "dl_lp_chk_md5" ).innerHTML = "";
+ document.getElementById( "dl_lp_chk_md5" ).title = "";
+ } else {
+ // If version is '4.1.5' (or older), it's OK to show the MD5 checksum file links.
+ DL.LINK_CHK_MD5_FULL = DL.ASF_ARC_BASE_URL + "/binaries/" + DL.LANG_SEL + "/" + DL.FILENAME_FULL + ".md5";
+ DL.LINK_CHK_MD5_LP = DL.ASF_ARC_BASE_URL + "/binaries/" + DL.LANG_SEL + "/" + DL.FILENAME_LP + ".md5";
+
+ document.getElementById( "space4" ).innerHTML = " , ";
+ document.getElementById( "dl_f_chk_md5" ).href = DL.LINK_CHK_MD5_FULL;
+ document.getElementById( "dl_f_chk_md5" ).innerHTML = l10n.dl_checksum_md5_text;
+ document.getElementById( "dl_f_chk_md5" ).title = l10n.dl_checksum_md5_title + DL.FILENAME_FULL;
+
+ document.getElementById( "space8" ).innerHTML = " , ";
+ document.getElementById( "dl_lp_chk_md5" ).href = DL.LINK_CHK_MD5_LP;
+ document.getElementById( "dl_lp_chk_md5" ).innerHTML = l10n.dl_checksum_md5_text;
+ document.getElementById( "dl_lp_chk_md5" ).title = l10n.dl_checksum_md5_title + DL.FILENAME_LP;
+ }
+
// Show the CSS style for the normal sub-box and hide all elements for error text.
document.getElementById( "sub_box" ).className = "sub-green-sel";
document.getElementById( "dl_err_img" ).style.display = "none";
@@ -1305,14 +1362,17 @@ DL.debug = function( location ) {
+ "FILESIZE_FULL: " + "\t\t\t\t\t\t" + DL.FILESIZE_FULL + "\n"
+ "FILESIZE_LP: " + "\t\t\t\t\t\t" + DL.FILESIZE_LP + "\n"
+ "EXTENSION: " + "\t\t\t\t\t\t" + DL.EXTENSION + "\n"
+ + "INSTALL_EXTENSION: " + "\t\t\t\t\t\t" + DL.INSTALL_EXTENSION + "\n"
+ "LINK_FULL: " + "\t\t\t\t\t\t" + DL.LINK_FULL + "\n"
+ "LINK_LP: " + "\t\t\t\t\t\t\t" + DL.LINK_LP + "\n"
+ "LINK_CHK_ASC_FULL: " + "\t\t\t\t\t" + DL.LINK_CHK_ASC_FULL + "\n"
- + "LINK_CHK_MD5_FULL: " + "\t\t\t\t\t" + DL.LINK_CHK_MD5_FULL + "\n"
+ "LINK_CHK_SHA256_FULL: " + "\t\t\t\t" + DL.LINK_CHK_SHA256_FULL + "\n"
+ + "LINK_CHK_SHA512_FULL: " + "\t\t\t\t" + DL.LINK_CHK_SHA512_FULL + "\n"
+ + "LINK_CHK_MD5_FULL: " + "\t\t\t\t\t" + DL.LINK_CHK_MD5_FULL + "\n"
+ "LINK_CHK_ASC_LP: " + "\t\t\t\t\t" + DL.LINK_CHK_ASC_LP + "\n"
- + "LINK_CHK_MD5_LP: " + "\t\t\t\t\t" + DL.LINK_CHK_MD5_LP + "\n"
+ "LINK_CHK_SHA256_LP: " + "\t\t\t\t" + DL.LINK_CHK_SHA256_LP + "\n"
+ + "LINK_CHK_SHA512_LP: " + "\t\t\t\t" + DL.LINK_CHK_SHA512_LP + "\n"
+ + "LINK_CHK_MD5_LP: " + "\t\t\t\t\t" + DL.LINK_CHK_MD5_LP + "\n"
+ "SHOW_SUB_BOX: " + "\t\t\t\t\t" + DL.SHOW_SUB_BOX + "\n"
+ "ERROR: " + "\t\t\t\t\t\t\t" + DL.ERROR + "\n" );