Skip to content

4.7.0 regression | Files consisting of unicode characters are saved with a broken name. #25456

@IgorOhrimenko

Description

@IgorOhrimenko

Files consisting of unicode characters are saved with a broken name.

Reproduce issue

  1. docker-compose up --detach
compose.yaml
services:
  rocketchat:
    image: registry.rocket.chat/rocketchat/rocket.chat:4.7.0
    command: >
      bash -c
        "for i in `seq 1 30`; do
          node main.js &&
          s=$$? && break || s=$$?;
          echo \"Tried $$i times. Waiting 5 secs...\";
          sleep 5;
        done; (exit $$s)"
    restart: unless-stopped
    environment:
      - MONGO_URL=mongodb://mongo:27017/rocketchat
      - MONGO_OPLOG_URL=mongodb://mongo:27017/local
    depends_on:
      - mongo
    ports:
      - 3000:3000

  mongo:
    image: mongo:5.0
    restart: unless-stopped
    volumes:
      - ./data/db:/data/db
      - ./data/dump:/dump
    command: docker-entrypoint.sh mongod --oplogSize 128 --replSet rs0 --storageEngine=wiredTiger

  mongo-init-replica:
    image: mongo:5.0
    command: >
      bash -c
        "for i in `seq 1 30`; do
          mongo mongo/rocketchat --eval \"
            rs.initiate({
              _id: 'rs0',
              members: [ { _id: 0, host: 'localhost:27017' } ]})\" &&
          s=$$? && break || s=$$?;
          echo \"Tried $$i times. Waiting 5 secs...\";
          sleep 5;
        done; (exit $$s)"
    depends_on:
      - mongo
  1. Try upload file with UTF characters any UTF character from https://www.w3.org/2001/06/utf-8-test/UTF-8-demo.html, example Σὲ γνωρίζω ἀπὸ τὴν κόψη
  2. See broken filename
    3.1. error on console
Details
rocketchat_1          | FileStream {
rocketchat_1          |   _readableState: ReadableState {
rocketchat_1          |     objectMode: false,
rocketchat_1          |     highWaterMark: 16384,
rocketchat_1          |     buffer: BufferList { head: null, tail: null, length: 0 },
rocketchat_1          |     length: 0,
rocketchat_1          |     pipes: [],
rocketchat_1          |     flowing: null,
rocketchat_1          |     ended: false,
rocketchat_1          |     endEmitted: false,
rocketchat_1          |     reading: false,
rocketchat_1          |     sync: true,
rocketchat_1          |     needReadable: false,
rocketchat_1          |     emittedReadable: false,
rocketchat_1          |     readableListening: false,
rocketchat_1          |     resumeScheduled: false,
rocketchat_1          |     errorEmitted: false,
rocketchat_1          |     emitClose: true,
rocketchat_1          |     autoDestroy: true,
rocketchat_1          |     destroyed: false,
rocketchat_1          |     errored: null,
rocketchat_1          |     closed: false,
rocketchat_1          |     closeEmitted: false,
rocketchat_1          |     defaultEncoding: 'utf8',
rocketchat_1          |     awaitDrainWriters: null,
rocketchat_1          |     multiAwaitDrain: false,
rocketchat_1          |     readingMore: false,
rocketchat_1          |     dataEmitted: false,
rocketchat_1          |     decoder: null,
rocketchat_1          |     encoding: null,
rocketchat_1          |     [Symbol(kPaused)]: null
rocketchat_1          |   },
rocketchat_1          |   _events: [Object: null prototype] {
rocketchat_1          |     end: [Function: bound onceWrapper] { listener: [Function (anonymous)] }
rocketchat_1          |   },
rocketchat_1          |   _eventsCount: 1,
rocketchat_1          |   _maxListeners: undefined,
rocketchat_1          |   truncated: false,
rocketchat_1          |   _readcb: null,
rocketchat_1          |   [Symbol(kCapture)]: false
rocketchat_1          | }

3.2. video https://user-images.githubusercontent.com/24807060/167589178-44dce1de-2f9a-419b-8513-fca0c10b5206.mp4
3.3. Response изображение

RocketChat 4.6.3. does not have this problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions