file name consisting of blanks only accepted but misbehaves

Bug #1095179 reported by Jiri Baum (Catalyst)
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Medium
Cecilia Vela Gurovic

Bug Description

When an uploaded file is renamed to a filename consisting of spaces only, this is accepted but misbehaves.

Steps to reproduce:
1) Log in as administrator.
2) Go to Administration -> Configure site -> Site files.
3) Upload a file.
4) Click on the pencil icon to the right of the file.
5) Change the name field to a single space and click "Save changes". Observe that the save succeeds.
6) Click on the pencil icon to the right of the file. Observe that the name field is blank (no spaces).
7) Click on "Save changes". Observe that the save fails with the error "The name field is required".

Expected behaviour:
a) the save fails in step 5 with the error message "The name field is required"; or, failing that,
b) the spaces are preserved for step 6 and the save succeeds in step 7.

Versions:
* 1.6_STABLE 4892034
* master bf58c38

Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :

This still happens.

Changed in mahara:
status: New → Confirmed
importance: Undecided → Medium
Changed in mahara:
assignee: nobody → Cecilia Vela Gurovic (ceciliavg)
Changed in mahara:
status: Confirmed → In Progress
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/7075

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/7075
Committed: https://git.mahara.org/mahara/mahara/commit/be7871eb4a19c7f8bef127e7222c1b0956fadfd8
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit be7871eb4a19c7f8bef127e7222c1b0956fadfd8
Author: Cecilia Vela Gurovic <email address hidden>
Date: Wed Oct 5 15:27:58 2016 +1300

Bug 1095179: A sequence of spaces cannot be a filename

behatnotneeded

Change-Id: I9c2623c451735d2fc50d8b6240edfa0fe47391da

Robert Lyon (robertl-9)
Changed in mahara:
status: In Progress → Fix Committed
milestone: none → 16.10.0
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "16.10_STABLE" branch: https://reviews.mahara.org/7089

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/7089
Committed: https://git.mahara.org/mahara/mahara/commit/6bbb045534d55741d5d2db6e7138c5363203bc38
Submitter: Robert Lyon (<email address hidden>)
Branch: 16.10_STABLE

commit 6bbb045534d55741d5d2db6e7138c5363203bc38
Author: Cecilia Vela Gurovic <email address hidden>
Date: Wed Oct 5 15:27:58 2016 +1300

Bug 1095179: A sequence of spaces cannot be a filename

behatnotneeded

Change-Id: I9c2623c451735d2fc50d8b6240edfa0fe47391da
(cherry picked from commit be7871eb4a19c7f8bef127e7222c1b0956fadfd8)

Robert Lyon (robertl-9)
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.