Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-39947

"The character encoding [base64] is not supported" error with some profile image uploads

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Verified
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 11.4, 12.1, 19.0
    • Fix Version/s: 12.3, 19.0
    • Component/s: Portal, Profile
    • Labels:
    • 12 status:
      Resolved
    • Test Plan:
      Hide
      • tail the tomcat logs
      • login to sakai
      • open Home -> Profile
      • upload a new profile picture using the attached image apereo tiger blue.jpg
      • after uploading press shift+command+r to reload the page
      • check the tomcat logs
      • an exception occurs
      Show
      tail the tomcat logs login to sakai open Home -> Profile upload a new profile picture using the attached image apereo tiger blue.jpg after uploading press shift+command+r to reload the page check the tomcat logs an exception occurs

      Description

      We're running Sakai 11.4 with Java 1.8 and Tomcat 8.5.30

      I don't believe this happens with our Sakai 11.4 w/tomcat 8.0.50. (I wasn't able to do a good test on the nightly 11.4 server because the log file is too large and loading in my browser was not working)

      It seems to have appeared when we switched over to Tomcat 8.5.28.
      I was able to reproduce the problem on the nightly 11.x qa server

      This problem _doesn't appear _to cause any issue in the UI, however you can see the error in the logs.

      But the strangest thing is that this problem only happens with some images. Perhaps in the way they were encoded? (or maybe vice versa, improper encoding in other files prevents the error?)

      e.g.
      The error happens with: apereo tiger blue.png
      It does not happen with: apereo tiger pink.png

      May 01, 2018 9:20:03 PM org.apache.catalina.connector.Response setCharacterEncoding
      WARNING: The encoding [BASE64] is not recognised by the JRE
      java.lang.IllegalArgumentException: java.io.UnsupportedEncodingException: The character encoding [base64] is not supported
      	at org.apache.coyote.Response.setCharacterEncoding(Response.java:417)
      	at org.apache.catalina.connector.Response.setCharacterEncoding(Response.java:848)
      	at org.apache.catalina.connector.ResponseFacade.setCharacterEncoding(ResponseFacade.java:624)
      	at javax.servlet.ServletResponseWrapper.setCharacterEncoding(ServletResponseWrapper.java:82)
      	at org.sakaiproject.entitybroker.rest.EntityActionsManager.handleCustomActionRequest(EntityActionsManager.java:118)
      	at org.sakaiproject.entitybroker.rest.EntityHandlerImpl.handleEntityAccess(EntityHandlerImpl.java:409)
      	at org.sakaiproject.entitybroker.util.servlet.DirectServlet.dispatch(DirectServlet.java:189)
      	at org.sakaiproject.entitybroker.servlet.SakaiDirectServlet.dispatch(SakaiDirectServlet.java:148)
      	at org.sakaiproject.entitybroker.util.servlet.DirectServlet.handleRequest(DirectServlet.java:159)
      	at org.sakaiproject.entitybroker.util.servlet.DirectServlet.service(DirectServlet.java:134)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at org.sakaiproject.oauth.filter.OAuthPostFilter.doFilter(OAuthPostFilter.java:60)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at org.sakaiproject.util.RequestFilter.doFilter(RequestFilter.java:460)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at org.sakaiproject.oauth.filter.OAuthPreFilter.doFilter(OAuthPreFilter.java:74)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
      	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
      	at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:677)
      	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
      	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803)
      	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
      	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790)
      	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459)
      	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: java.io.UnsupportedEncodingException: The character encoding [base64] is not supported
      	at org.apache.tomcat.util.buf.B2CConverter.getCharsetLower(B2CConverter.java:101)
      	at org.apache.tomcat.util.buf.B2CConverter.getCharset(B2CConverter.java:76)
      	at org.apache.coyote.Response.setCharacterEncoding(Response.java:415)
      	... 40 more
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  austinUH Austin
                  Reporter:
                  austinUH Austin
                • Votes:
                  1 Vote for this issue
                  Watchers:
                  6 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Git Source Code