Skip to:
Content

BuddyPress.org

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#3119 closed defect (bug) (duplicate)

Avatar uploads do not accept files with uppercase extensions.

Reported by: cpilko's profile CPilko Owned by:
Milestone: 1.5 Priority: normal
Severity: normal Version:
Component: Core Keywords:
Cc:

Description

Attempting to upload a valid file with an uppercase extension gives an error "Please upload only JPG, GIF or PNG photos."

Line 525 of /bp-core/bp-core-avatars.php should be changed from:

	if ( ( !empty( $file['file']['type'] ) && !preg_match('/(jpe?g|gif|png)$/', $file['file']['type'] ) ) || !preg_match( '/(jpe?g|gif|png)$/', $file['file']['name'] ) )

to a case insensitive preg_match.

	if ( ( !empty( $file['file']['type'] ) && !preg_match('/(jpe?g|gif|png)$/i', $file['file']['type'] ) ) || !preg_match( '/(jpe?g|gif|png)$/i', $file['file']['name'] ) )

Change History (2)

#1 @r-a-y
13 years ago

  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #3087.

#2 @johnjamesjacoby
13 years ago

  • Keywords avatar upload removed
  • Milestone changed from Awaiting Review to 1.5
  • Severity set to normal
  • Version 1.2.8 deleted

Moving closed ticket out of Awaiting Review.

Note: See TracTickets for help on using tickets.