Bug #39052

Send sane HTTP response in showpic on error

Added by Christian Kuhn about 10 years ago. Updated almost 10 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Frontend
Target version:
Start date:
2012-07-18
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.0
PHP Version:
5.3
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:

Description

Currently, if showpic.php requests fail, exceptions are thrown. Those are
usually converted to a HTTP response 500 (internal server error) by the
production exception handler. Crawlers react on 500 by trying to index
the resource again later.

This is changed to now set specific response codes. If the paramters are
incorrect or broken, an 410 (Gone) will be sent, informing users and
crawlers that the resource is not available under this URL. Crawlers
like googleBot will then stop requesting the resource.

In case all parameters are ok, but the image itself is not found, a 404
will be sent to the client. Crawlers will try to index the resource
again only if there are still links pointing to the resource.


Related issues

Related to TYPO3 Core - Bug #24453: showpic.php causes a fatal error if parameters GET variable is not an arrayClosedSteffen Ritter2011-01-02

Actions
Related to TYPO3 Core - Bug #26893: BE Log is flooded with "Parameter Error: No file or no parameters given." from showpic.phpClosedChris topher2011-05-18

Actions
Related to TYPO3 Core - Bug #38896: Core: Exception handler (WEB) and Showpic.phpClosedBenni Mack2012-07-12

Actions
#1

Updated by Gerrit Code Review about 10 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/12867

#2

Updated by Christian Kuhn about 10 years ago

Example:

http://www.domain.foo/?eID=tx_cms_showpic&file=uploads%2Ftx_foo%2Faoeu.jpg&md5=7ec23ea567813281234569acb0e24347adfb8645&parameters0=YoeuntzOjU6IndpZHRoIjtzOjQ6Ijc3MG0iO3M6NzoiYm9keVRhZyI7czo2ODoi&parameters1=PGJvZHkgbGVmdG1hcmdpbj0iMCIgdG9wbWFyZ2lIwIiBtYXJnaW53aWR0aD0i&parameters2=MCIgbWFyZ2luaGVpZ2h0PSIwIj4iO3M6NDoid3I7czozNToiPGEgaHJlZj0i&parameters3=amF2YXNjcmlwjbG9zZSgpOyI%2BfDwvYT4iO30%3D

Will result in a 410 after the patch, and was an exception before.

#3

Updated by Gerrit Code Review about 10 years ago

Patch set 1 for branch TYPO3_4-7 has been pushed to the review server.
It is available at http://review.typo3.org/12915

#4

Updated by Gerrit Code Review about 10 years ago

Patch set 1 for branch TYPO3_4-6 has been pushed to the review server.
It is available at http://review.typo3.org/12917

#5

Updated by Gerrit Code Review about 10 years ago

Patch set 1 for branch TYPO3_4-5 has been pushed to the review server.
It is available at http://review.typo3.org/12919

#6

Updated by Christian Kuhn about 10 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
#7

Updated by Gerrit Code Review about 10 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch TYPO3_4-7 has been pushed to the review server.
It is available at http://review.typo3.org/13198

#8

Updated by Christian Kuhn about 10 years ago

  • Status changed from Under Review to Resolved
#9

Updated by Gerrit Code Review about 10 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch TYPO3_4-6 has been pushed to the review server.
It is available at http://review.typo3.org/13305

#10

Updated by Wouter Wolters almost 10 years ago

Please close this issue. All affected branches are up to date.

#11

Updated by Stefan Galinski almost 10 years ago

  • Status changed from Under Review to Closed

Also available in: Atom PDF