6.0.0-alpha10
▾
Tasks
New Task
Search
Photos
Wiki
▾
Tickets
New Ticket
Search
dev.horde.org
Toggle Alerts Log
Help
5/16/25
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#7843] yaml loader fails if string contain curly brackets
*
Your Email Address
*
Spam protection
Enter the letters below:
.__.. .. ..___\ / | |\ /|\ |[__ >< |__\ \/ | \|| / \
Comment
> Consider the following yaml snippet > > > > ---<snip>--- > > routes: > > index: > > controller: net_nemein_news_controllers_index > > action: latest > > route: / > > content_entry_point: nnn-show-latest > > allowed_methods: > > - OPTIONS > > - GET > > - PROPFIND > > latest: > > controller: net_nemein_news_controllers_index > > action: latest > > route: "/latest/{$int:number}/" > > content_entry_point: nnn-show-latest > > rss: > > controller: net_nemein_news_controllers_index > > action: latest > > route: /rss.xml > > mimetype: text/xml > > template_entry_point: nnn-show-rss > > show: > > controller: net_nemein_news_controllers_article > > action: show > > route: "/{$name}/" > > content_entry_point: nnn-show-article > > edit: > > controller: net_nemein_news_controllers_article > > action: edit > > route: "/{$name}/edit" > > content_entry_point: nnn-edit-article > > ---<snap>--- > > > > This has the same bug as spyck in the parser (supposedly) thinking > that the curly brackets inside strings are inline maps > > > > syck parses this correctly even when the routes with curly brackets > are not quoted. > > > > tested on "PHP 5.2.0-8+etch11 (cli)" using the following code and > horde/Yaml-1.0.1 via PEAR. > > > > ---<snip>--- > > <?php > > error_reporting(E_ALL); > > require_once('Horde/Yaml.php'); > > require_once('Horde/Yaml/Node.php'); > > require_once('Horde/Yaml/Exception.php'); > > require_once('Horde/Yaml/Loader.php'); > > $path = realpath(dirname(__FILE__)) . '/test.yml'; > > echo "path={$path}\n"; > > $array = Horde_Yaml::load($path); > > if ( !( isset($array['routes']) > > && isset($array['routes']['latest']) > > && isset($array['routes']['latest']['route']) > > && is_string($array['routes']['latest']['route'])) > > || !( isset($array['routes']) > > && isset($array['routes']['show']) > > && isset($array['routes']['show']['route']) > > && is_string($array['routes']['show']['route'])) > > ) > > { > > echo "ERROR: Invalidly parsed route\n"; > > var_dump($array); > > exit(1); > > } > > > > echo "No errors detected"; > > ?> > > ---<snip>---
Attachment
Watch this ticket
N
ew Ticket
M
y Tickets
S
earch
Q
uery Builder
R
eports
Saved Queries
Open Bugs
Bugs waiting for Feedback
Open Bugs in Releases
Open Enhancements
Enhancements waiting for Feedback
Bugs with Patches
Enhancements with Patches
Release Showstoppers
Stalled Tickets
New Tickets
Horde 5 Showstoppers