Skip to:
Content

BuddyPress.org

Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#3119 closed defect (bug) (duplicate)

Avatar uploads do not accept files with uppercase extensions.

Reported by: CPilko Owned by:
Priority: normal Milestone: 1.5
Component: Core Version:
Severity: normal 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
15 years ago

  • Resolutionduplicate
  • Status newclosed

Duplicate of #3087.

#2 @johnjamesjacoby
15 years ago

  • Keywords avatar upload removed
  • Milestone Awaiting Review1.5
  • Severitynormal
  • Version 1.2.8

Moving closed ticket out of Awaiting Review.

Note: See TracTickets for help on using tickets.