Skip to content
GitLab
    • Explore Projects Groups Topics Snippets
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • fusiondirectory fusiondirectory
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 39
    • Issues 39
    • List
    • Boards
    • Service Desk
    • Milestones
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Terraform modules
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • fusiondirectoryfusiondirectory
  • fusiondirectoryfusiondirectory
  • Issues
  • #5802
Something went wrong while setting issue due date.
Closed
Open
Issue created 7 years ago by bmortier@bmortierMaintainer
  • New related issue

  • New related issue

FileAttribute through webservice should base64 encode binary data to avoid crashes

Closed

FileAttribute through webservice should base64 encode binary data to avoid crashes

Description

When certain images are set as profile picture, the API no longer returns any data (At all).

Distribution Name and Version

Whatever demo.fusiondirectory.org runs on and Debian 8.

FusionDirectory Version

1.2

PHP version used

Whatever demo.fusiondirectory.org uses.

Origin of php packages

Whatever demo.fusiondirectory.org uses.

Steps to Reproduce

  1. Set image fd_non_working_image.jpg (Supplied) as account image for a user.
  2. Get data for user using the method getfields() in the API.
  3. Observe nothing beeing returned by the API.

fd_non_working_image

Expected behavior:

User's data should be returned.

Actual behavior:

No data is returned.

Reproduces how often:

100%

Additional Information

Bug observed on both own installation of FD1.2 and demo.fusiondirectory.org.

Behavior is dependent on the image. Only some (like the attached) jpeg files reveal the bug.

Edited 6 years ago

    Tasks

    0

    No tasks are currently assigned. Use tasks to break down this issue into smaller parts.

    Linked items
    0

    Link issues together to show that they're related. Learn more.

    Activity


    • bmortier changed the description 7 years ago

      changed the description

      By tbp on 2018-03-22T11:48:53 (imported from GitLab)

    • bmortier assigned to @MCMic 7 years ago

      assigned to @MCMic

      By bmortier on 2018-03-22T12:36:33 (imported from GitLab)

    • bmortier changed milestone to %FusionDirectory 1.3 7 years ago

      changed milestone to %FusionDirectory 1.3

      By bmortier on 2018-03-22T12:36:38 (imported from GitLab)

    • bmortier mentioned in issue fd-plugins#5796 (closed) 7 years ago

      mentioned in issue fd-plugins#5796 (closed)

      By Côme Chilliet on 2018-03-22T16:47:51 (imported from GitLab)

    • bmortier
      bmortier @bmortier · 7 years ago
      Author Maintainer

      Had a hard time to get an error message but I finally got it (see fd-plugins#5796 (closed) ). So the problem is:

      Request error: Failed to encode response: Malformed UTF-8 characters, possibly incorrectly encoded

      So I guess depending of the content of the image it can contain stuff which cannot be encoded as a json string as-is. This means we need to rethink how fileattribute get serialized. Should we use base64? Should we just omit them and add an other method to get the value, just in case the value is too big?

      By Côme Chilliet on 2018-03-22T16:50:27 (imported from GitLab)

    • bmortier
      bmortier @bmortier · 7 years ago
      Author Maintainer

      The image that triggers this bug, was made with theis Python library (PIL): http://www.pythonware.com/products/pil/

      It's possible, there could be a bug in PIL.

      No matter what the cause is, FD should return something if faced with such an image.

      By tbp on 2018-03-23T08:29:45 (imported from GitLab)

    • bmortier added PJ1802-0188 label 7 years ago

      added PJ1802-0188 label

      By bmortier on 2018-03-26T08:26:55 (imported from GitLab)

    • bmortier created branch 5802-some-jpeg-images-break-the-api 7 years ago

      created branch 5802-some-jpeg-images-break-the-api

      By Côme Chilliet on 2018-03-26T12:29:28 (imported from GitLab)

    • bmortier mentioned in merge request !181 7 years ago

      mentioned in merge request !181

      By Côme Chilliet on 2018-03-26T12:29:30 (imported from GitLab)

    • bmortier mentioned in commit fe67e0c4 7 years ago

      mentioned in commit fe67e0c4

      By Côme Chilliet on 2018-03-26T12:30:59 (imported from GitLab)

    • bmortier added 1h of time spent at 2018-03-26 7 years ago

      added 1h of time spent at 2018-03-26

      By Côme Chilliet on 2018-03-26T12:50:46 (imported from GitLab)

    • bmortier added To Be Tested label 7 years ago

      added To Be Tested label

      By Côme Chilliet on 2018-03-26T12:50:46 (imported from GitLab)

    • bmortier removed Bugs label 7 years ago

      removed Bugs label

      By bmortier on 2018-03-30T16:50:49 (imported from GitLab)

    • bmortier
      bmortier @bmortier · 6 years ago
      Author Maintainer

      Tested on demo-dev and getfields return something now

      By Jonathan Swaelens on 2018-07-05T09:39:32 (imported from GitLab)

    • bmortier closed 6 years ago

      closed

      By Jonathan Swaelens on 2018-07-05T09:39:33 (imported from GitLab)

    • bmortier added 40m of time spent at 2018-07-05 6 years ago

      added 40m of time spent at 2018-07-05

      By Jonathan Swaelens on 2018-07-05T09:39:35 (imported from GitLab)

    • bmortier added Fixed and removed To Be Tested labels 6 years ago

      added Fixed and removed To Be Tested labels

      By Jonathan Swaelens on 2018-07-05T09:39:35 (imported from GitLab)

    • bmortier changed title from Some jpeg images break the API to FileAttribute through webservice should base64 encode binary data to avoid crashes 6 years ago

      changed title from Some jpeg images break the API to FileAttribute through webservice should base64 encode binary data to avoid crashes

      By Côme Chilliet on 2018-07-19T13:26:57 (imported from GitLab)

    • bmortier added Changed and removed Fixed labels 6 years ago

      added Changed and removed Fixed labels

      By Côme Chilliet on 2018-07-19T13:27:11 (imported from GitLab)

    Please register or sign in to reply
    Assignee
    bmortier's avatar
    bmortier
    Assign to
    Labels
    0
    None
    0
    None
      Assign labels
    • Manage project labels

    Milestone
    No milestone
    None
    Due date
    None
    None
    None
    Time tracking
    No estimate or time spent
    Confidentiality
    Not confidential
    Not confidential

    You are going to turn on confidentiality. Only project members with at least the Reporter role, the author, and assignees can view or be notified about this issue.

    Lock issue
    Unlocked
    0
    0 Participants
    Reference:

    Menu

    Explore Projects Groups Topics Snippets