Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-3339

@MatchMedia uses invalid cookie syntax, cause error run-jetty-run

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 8.0.4
    • Freshly
    • None
    • Security Level: Jimmy
    • None
    • None

      Steps to Reproduce

      Use @MatchMedia in viewmodel

      Actual Result

      cookies look like:
      "ZKClientInfo=[-480,1920,1080,24,637,635,0,0,"1.5","landscape",true,"all and (max-width : 640px)"]; ZKMatchMedia=$$ZKMATCHMEDIA$$alland(max-width:640px); JSESSIONID=qweertyuioasdfgjkzxcvbnm"

      Expected Result

      cookies should look be properly encoded:
      "ZKClientInfo=%5B-480,1920,1080,24,637,635,0,0,%221.5%22,%22landscape%22,true,%22all%20and%20(max-width%20:%20640px)%22%5D;%20ZKMatchMedia=$$ZKMATCHMEDIA$$alland(max-width:640px);%20JSESSIONID=qweertyuioasdfgjkzxcvbnm"

      Debug Info

      Using MatchMedia creates invalid cookies under cookies V0 specs.
      Cookies V0 cannot support space or special characters.
      Internet explorer doesn't follow cookies V1 properly, could cause issues here too.

      on jetty6 (for example run-jetty-run), this causes errors as see on ZK-3247
      http://stackoverflow.com/questions/572482/why-do-cookie-values-with-whitespace-arrive-at-the-client-side-with-quotes

      http://stackoverflow.com/questions/25472623/how-to-set-cookie-version-0-or-1-used-by-java-servlets

            wenninghsu wenninghsu
            MDuchemin MDuchemin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 6 hours
                6h