[MAGNOLIA-1777] Incorrect VirtualURI configuration may cause a loop Created: 12/Oct/07  Updated: 23/Jan/13  Resolved: 12/Oct/07

Status: Closed
Project: Magnolia
Component/s: core
Affects Version/s: 3.1 M3
Fix Version/s: 3.5 RC1

Type: Bug Priority: Minor
Reporter: Fabrizio Giustina Assignee: Fabrizio Giustina
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
supersession
is superseded by MAGNOLIA-2754 Possibility to apply multiple virtual... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

An incorrect virtual uri configuration may cause a loop, ending in a StackOverflow or never ending with consumption of resources.
MgnlVirtualUriFilter should not be executed more than once for the same request to avoid this situation (this happens if the virtual uri points to itself or to another virtual uri)



 Comments   
Comment by Fabrizio Giustina [ 12/Oct/07 ]

now MgnlVirtualUriFilter extends OncePerRequestAbstractMagnoliaFilter, which automatically takes care of avoiding multiple executions during the same request

Comment by Magnolia International [ 12/Oct/07 ]

What if one actually wants to have several forwards? For instance if a page was renamed several times and referenced (bookmarked) by external sources, one might create virtualURIs, each fixing the subsequent renames ?

Comment by Fabrizio Giustina [ 12/Oct/07 ]

this still works using redirects and was already broken using magnolia "standard" forwards (without prefixes). In order to do a thing like the one you describe IMHO user must be forced to use redirects (which are also definitively more correct in case of a renaming / reorganizing of a website).
Still convinced we should not save users for crashing the system with a wrong default uri configuration?

Comment by Magnolia International [ 12/Oct/07 ]

(maybe not for now but) isn't there a smarter way of avoiding the potential problem ?
Also note that having the same configuration problem, but when doing this with redirects, will also cause problems, but on client side ("too many redirects")

Generated at Mon Feb 12 03:30:13 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.