Download & Extend

file_munge_filename() doc mentions watchdog but shouldn't

Project:Drupal core
Version:6.x-dev
Component:documentation
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)
Issue tags:Novice

Issue Summary

Documentation refers to watchdog in reference to its alerts parameter, but it's not called at all and the only other method it calls, drupal_set_message, doesn't call it either.

Maybe it should be removed?

Comments

#1

Title:Documentation problem with file_munge_filename» file_munge_filename() doc mentions watchdog but shouldn't
Version:6.x-dev» 7.x-dev

Agreed. watchdog() is not being called, and should be removed from the doc.

Please fix in Drupal 7 first, then backport patch to Drupal 6.

#2

Status:active» needs review

Here's some better (I think) doc for file_munge_filename().

AttachmentSizeStatusTest resultOperations
594518.patch1.54 KBIdlePassed: 13256 passes, 0 fails, 0 exceptionsView details

#3

Status:needs review» reviewed & tested by the community

Yes, patch applies on head.

Comment changes only. Seems thorough.

Watchdog was removed. Ship it!

Yeah! First patch review!

#4

Status:reviewed & tested by the community» needs review

Overall, a pass from me. Applies fine, solves the original problem by removing reference to watchdog(), and clarifies the rest of the documentation too. I might clarify the line which reads

If variable 'allow_insecure_uploads' evaluates to TRUE, no alterations will be made.

As it isn't immediately clear what this variable is, where it is set, etc.; but I would still pass the patch even if this line was kept as it currently is.

#5

Status:needs review» reviewed & tested by the community

Changing status to RTBC - accidentally changed away from this as we were both reviewing at the same time.

But FWIW, shouldn't patches only be set to RTBC when they've been received two positive reviews?

#6

Status:reviewed & tested by the community» fixed

Committed to CVS HEAD. Thanks!

#7

Status:fixed» patch (to be ported)

Needs port to Drupal 6.

#8

Version:7.x-dev» 6.x-dev
Status:patch (to be ported)» needs review

Here's a patch for Drupal 6.

AttachmentSizeStatusTest resultOperations
594518_D6.patch1.61 KBIgnored: Check issue status.NoneNone

#9

The comment doesn't address the obvious questions: When should filenames be munged? Why is “exploit.php.pps” a dangerous name? How do I choose the extensions that should not be altered?

#10

Please file this as a separate issue on Drupal 7. The original issue report here is that the doc mentions watchdog but shouldn't. If you think the doc needs more clarification in general, that is a separate issue.

Thanks!

#11

#12

Status:needs review» reviewed & tested by the community

Since this D6 patch sets the doc to exactly what it is in D7, and that was all approved and committed, I'm going to go ahead and set this to RTBC.

#13

Status:reviewed & tested by the community» fixed

Thanks, committed to Drupal 6.

#14

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.