Moodle

A file whose file name starts with '-' cannot be archived to backup file when external zip command is specified

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Won't Fix
  • Affects Version/s: 1.8, 1.8.1
  • Fix Version/s: None
  • Component/s: Backup, General
  • Labels:
    None
  • Environment:
    NetBSD-4.9.13, PHP 5.2.1
  • Affected Branches:
    MOODLE_18_STABLE

Description

A file whose file name includes '-' as a first character cannot be included in backup file when external zip command is specified in administrative page.
That is, if I try to backup files including such kind of a file, no backup file might be generated.

The cause is, the routine, 'clean_filename()', allows a file name to start with '-'.
Therefore, '-' seems to be treated as option argument of external zip command.

IMHO, clean_filename() should not allow a file name to start with '-' and I attached my patch fixing this problem.

Activity

Hide
Eloy Lafuente (stronk7) added a comment -

Assigning to Petr...

Show
Eloy Lafuente (stronk7) added a comment - Assigning to Petr...
Hide
Michael de Raadt added a comment -

Thanks for reporting this issue.

We have detected that this issue has been inactive for over a year has been recorded as affecting versions that are no longer supported.

If you believe that this issue is still relevant to current versions (2.1 and beyond), please comment on the issue. Issues left inactive for a further month will be closed.

Michael d;

lqjjLKA0p6

Show
Michael de Raadt added a comment - Thanks for reporting this issue. We have detected that this issue has been inactive for over a year has been recorded as affecting versions that are no longer supported. If you believe that this issue is still relevant to current versions (2.1 and beyond), please comment on the issue. Issues left inactive for a further month will be closed. Michael d; lqjjLKA0p6
Hide
Michael de Raadt added a comment -

I'm closing this issue as it has become inactive and does not appear to affect a current supported version. If you are encountering this problem or one similar, please launch a new issue.

Show
Michael de Raadt added a comment - I'm closing this issue as it has become inactive and does not appear to affect a current supported version. If you are encountering this problem or one similar, please launch a new issue.

People

Vote (0)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: