]> source.dussan.org Git - vaadin-framework.git/commitdiff
chore: Add a very visible obsoletion message (#12634)
authorPatrik Lindström <99639133+thevaadinman@users.noreply.github.com>
Fri, 8 Nov 2024 08:02:31 +0000 (10:02 +0200)
committerPatrik Lindström <patrik@vaadin.com>
Fri, 8 Nov 2024 08:12:09 +0000 (10:12 +0200)
Adds a warning banner to the Vaadin startup when not in production mode, warning the user about known security vulnerabilities and encouraging them to upgrade to a supported version.

server/src/main/java/com/vaadin/server/Constants.java
server/src/main/java/com/vaadin/server/DefaultDeploymentConfiguration.java

index d4559b1cfe65a93b67c951c1853dcb0a653838e4..392f0bf521153e3d26282e596264c62fe2e3049a 100644 (file)
@@ -102,6 +102,26 @@ public interface Constants {
             + "VaadinService if you're not using custom class loader.\n"
             + "NullPointerExceptions will be thrown later."
             + "=================================================================";
+    
+    static final String UNMAINTAINED_VERSION_WARNING = "\n"
+            + " .:::::::::::::::::::::::  WARNING  :::::::::::::::::::::::. \n"
+            + "::'                                                       '::\n"
+            + "::                                                         ::\n"
+            + "::                  P L E A S E   N O T E                  ::\n"
+            + "::                                                         ::\n"
+            + "::                                                         ::\n"
+            + "::   This is an unmaintained version of Vaadin Framework   ::\n"
+            + "::               with known security issues.               ::\n"
+            + "::                                                         ::\n"
+            + "::        To upgrade to a maintained version, go to        ::\n"
+            + "::                                                         ::\n"
+            + "::     https://vaadin.com/vaadin-8-extended-maintenance    ::\n"
+            + "::                                                         ::\n"
+            + "::                                                         ::\n"
+            + "::.                                                       .::\n"
+            + " ':::::::::::::::::::::::  WARNING  :::::::::::::::::::::::' \n"
+            + "\n";
+
 
     static final String URL_PARAMETER_THEME = "theme";
 
index 03e5d621877a95bf54887a92405890eb80f90f5e..548189cdeea3d37330dbd93a4d23af532d7a2fed 100644 (file)
@@ -265,12 +265,15 @@ public class DefaultDeploymentConfiguration
 
     /**
      * Log a warning if Vaadin is not running in production mode.
+     *
+     * Also show a warning about unmaintained version.
      */
     private void checkProductionMode() {
         productionMode = getApplicationOrSystemProperty(
                 Constants.SERVLET_PARAMETER_PRODUCTION_MODE, "false")
                         .equals("true");
         if (!productionMode) {
+            getLogger().warning(Constants.UNMAINTAINED_VERSION_WARNING);
             getLogger().warning(Constants.NOT_PRODUCTION_MODE_INFO);
         }
     }