Project

General

Profile

Bug #63222

nettoyage du nom de fichier; ValueError: A string literal cannot contain NUL (0x00) characters.

Added by Sentry Io 10 months ago. Updated 10 months ago.

Status:
Nouveau
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
26 March 2022
Due date:
% Done:

0%

Estimated time:
Patch proposed:
No
Planning:
No

Description

https://sentry.entrouvert.org/entrouvert/publik/issues/54834/

ValueError: A string literal cannot contain NUL (0x00) characters.
(19 additional frame(s) were not displayed)
...
  File "django/db/models/sql/compiler.py", line 1377, in execute_sql
    cursor.execute(sql, params)
  File "django/db/backends/utils.py", line 99, in execute
    return super().execute(sql, params)
  File "django/db/backends/utils.py", line 67, in execute
    return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
  File "django/db/backends/utils.py", line 76, in _execute_with_wrappers
    return executor(sql, params, many, context)
  File "django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
    def save(self, *args, **kwargs):
        self.instance.filename = self.files['content'].name[:512]
        self.instance.document = models.Document.objects.get_by_file(self.files['content'])
→       return super().save(*args, **kwargs)

(audit)

History

#1

Updated by Frédéric Péters 10 months ago

  • Project changed from Suivi des traces to Fargo

Also available in: Atom PDF