Wicket
  1. Wicket
  2. WICKET-4266

AjaxEditableLabel does not work when using CryptoMapper

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.3
    • Fix Version/s: 1.5.4, 6.0.0-beta1
    • Component/s: wicket, wicket-extensions
    • Environment:

      Description

      AjaxEditableLabel, from extensions, never works when using CryptoMapper.

      The wicket ajax debug window shows a 404, like the following.

      INFO: Initiating Ajax GET request on 91uu9ZgjBKhxZoic_SU3NJwUE3Bin1mwtzj6iEczwYDitUclGWhvJg&save=true&ael:editor=edit%20me%20now!?random=0.06433736416511238
      INFO: Invoking pre-call handler(s)...
      INFO: focus removed from editor3
      INFO: focus set on wicketAjaxDebugScrollLock
      ERROR: Received Ajax response with code: 404
      INFO: Invoking post-call handler(s)...
      INFO: Invoking failure handler(s)...

      On the server side, the log shows:

      DEBUG - taStore$PageSavingRunnable - Saving asynchronously: Entry [sessionId=1a58f8f8ktcthiauyfc3a0ljp, pageId=3]...
      DEBUG - DiskDataStore - Storing data for page with id '3' in session with id '1a58f8f8ktcthiauyfc3a0ljp'
      DEBUG - PageAccessSynchronizer - 'qtp552451240-21' notifying blocked threads
      ERROR - AbstractCrypt - Error decoding text: 7gg4MWWtY8WW6zszrUHAJJUziEUEOZ6CTzt3NJ2Z36Wgjbno59hklA&save=true&ael:editor=edit me
      java.lang.RuntimeException: Unable to decrypt the text '81e�cŖ�;3�A�$�3�E9��O;w4��ߥ������d��'
      at org.apache.wicket.util.crypt.AbstractCrypt.decryptByteArray(AbstractCrypt.java:150)
      at org.apache.wicket.util.crypt.AbstractCrypt.decryptUrlSafe(AbstractCrypt.java:66)
      at org.apache.wicket.request.mapper.CryptoMapper.decryptUrl(CryptoMapper.java:159)
      at org.apache.wicket.request.mapper.CryptoMapper.mapRequest(CryptoMapper.java:102)
      at org.apache.wicket.request.cycle.RequestCycle.resolveRequestHandler(RequestCycle.java:181)
      at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:206)
      at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:280)
      at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162)
      at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:218)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1326)
      at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:479)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
      at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:520)
      at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)
      at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:940)
      at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:409)
      at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186)
      at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:874)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
      at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)
      at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149)
      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)
      at org.eclipse.jetty.server.Server.handle(Server.java:349)
      at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:441)
      at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:904)
      at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:565)
      at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:217)
      at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:50)
      at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:245)
      at org.eclipse.jetty.server.ssl.SslSocketConnector$SslConnectorEndPoint.run(SslSocketConnector.java:667)
      at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:598)
      at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:533)
      at java.lang.Thread.run(Thread.java:679)
      Caused by: javax.crypto.IllegalBlockSizeException: Input length must be multiple of 8 when decrypting with padded cipher
      at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:750)
      at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:676)
      at com.sun.crypto.provider.PBECipherCore.doFinal(PBECipherCore.java:422)
      at com.sun.crypto.provider.PBEWithMD5AndDESCipher.engineDoFinal(PBEWithMD5AndDESCipher.java:323)
      at javax.crypto.Cipher.doFinal(Cipher.java:1813)
      at org.apache.wicket.util.crypt.SunJceCrypt.crypt(SunJceCrypt.java:94)
      at org.apache.wicket.util.crypt.AbstractCrypt.decryptByteArray(AbstractCrypt.java:146)
      ... 32 more
      ERROR - CryptoMapper - Error decrypting URL
      java.lang.IllegalArgumentException: Argument 'url' may not be null.
      at org.apache.wicket.util.lang.Args.notNull(Args.java:41)
      at org.apache.wicket.request.Url.parse(Url.java:127)
      at org.apache.wicket.request.mapper.CryptoMapper.decryptUrl(CryptoMapper.java:160)
      at org.apache.wicket.request.mapper.CryptoMapper.mapRequest(CryptoMapper.java:102)
      at org.apache.wicket.request.cycle.RequestCycle.resolveRequestHandler(RequestCycle.java:181)
      at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:206)
      at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:280)
      at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162)
      at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:218)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1326)
      at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:479)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
      at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:520)
      at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)
      at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:940)
      at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:409)
      at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186)
      at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:874)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
      at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)
      at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149)
      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)
      at org.eclipse.jetty.server.Server.handle(Server.java:349)
      at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:441)
      at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:904)
      at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:565)
      at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:217)
      at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:50)
      at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:245)
      at org.eclipse.jetty.server.ssl.SslSocketConnector$SslConnectorEndPoint.run(SslSocketConnector.java:667)
      at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:598)
      at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:533)
      at java.lang.Thread.run(Thread.java:679)
      DEBUG - RequestCycle - No suitable handler found for URL 7gg4MWWtY8WW6zszrUHAJJUziEUEOZ6CTzt3NJ2Z36Wgjbno59hklA&save=true&ael:editor=edit%20me?random=0.6775260255672038, falling back to container to process this request

      1. quickstart.zip
        31 kB
        Marcelo Morales

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Martin Grigorov
            Reporter:
            Marcelo Morales
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development