{"id":354778,"date":"2024-05-20T22:55:15","date_gmt":"2024-05-20T22:55:15","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=354778"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=354778","title":{"rendered":"<span>\u041a\u043e\u0433\u0434\u0430 \u043f\u0430\u0440\u0441\u0435\u0440\u044b URL-\u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u0440\u0430\u0441\u0445\u043e\u0434\u044f\u0442\u0441\u044f (CVE-2023-38633)<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\"><a href=\"https:\/\/habr.com\/ru\/companies\/ruvds\/articles\/760766\/\"><\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/mh\/rp\/5n\/mhrp5n6l_w9lqyaki7-fgh3kln4.png\" data-src=\"https:\/\/habrastorage.org\/webt\/mh\/rp\/5n\/mhrp5n6l_w9lqyaki7-fgh3kln4.png\"\/><\/div>\n<p><\/a><br \/>  \u041e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0438 \u0440\u0430\u0437\u0431\u043e\u0440 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438 CVE-2023-38633 \u0432 <i>librsvg<\/i>, \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u044e\u0449\u0435\u0439\u0441\u044f \u0432 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438, \u043a\u043e\u0433\u0434\u0430 \u0434\u0432\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 URL-\u043f\u0430\u0440\u0441\u0435\u0440\u0430 (Rust \u0438 Glib) \u0440\u0430\u0441\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0435 \u0441\u0445\u0435\u043c\u044b \u0444\u0430\u0439\u043b\u0430, \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u044f \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u044c \u043a \u0430\u0442\u0430\u043a\u0435 \u043e\u0431\u0445\u043e\u0434\u0430 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430.<a name=\"habracut\"><\/a><\/p>\n<p>  \u0412 \u0440\u0430\u043c\u043a\u0430\u0445 \u0441\u0432\u043e\u0435\u0439 \u043c\u0438\u0441\u0441\u0438\u0438 \u043f\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u0441\u0430\u043c\u043e\u0439 \u043d\u0430\u0434\u0451\u0436\u043d\u043e\u0439 \u0432 \u043c\u0438\u0440\u0435 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u043c\u044b \u0432 Canva \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u043e \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0435\u043c \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u043d\u0430\u0448\u0438\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0445 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439. \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0438 \u0443\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0445 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u0445 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043f\u043e\u0432\u044b\u0441\u0438\u0442\u044c \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0448\u0435\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b, \u043d\u043e \u0438 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430 \u0432 \u0446\u0435\u043b\u043e\u043c. \u0412\u043a\u0443\u043f\u0435 \u0441 \u0442\u0430\u043a\u0438\u043c\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c\u044e, \u043a\u0430\u043a \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0441\u0440\u0435\u0434\u044b, \u043c\u044b \u0432\u0441\u0451 \u0431\u043e\u043b\u044c\u0448\u0435 \u0443\u0441\u043b\u043e\u0436\u043d\u044f\u0435\u043c \u0434\u043b\u044f \u0437\u043b\u043e\u0443\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u0438\u043a\u043e\u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u0438 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0445 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439.<\/p>\n<p>  \u041e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0442\u0430\u043a\u0438\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0432 Canva \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f <i><a href=\"https:\/\/web.archive.org\/web\/20230911070144\/https:\/gitlab.gnome.org\/GNOME\/librsvg\">librsvg<\/a><\/i> (\u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 <a href=\"https:\/\/web.archive.org\/web\/20230911070144\/https:\/www.libvips.org\">libvips<\/a>). \u042d\u0442\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0431\u044b\u0441\u0442\u0440\u043e \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 SVG \u0432 \u043f\u0438\u043a\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u0432\u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u044b\u0435 \u0432 \u0432\u0438\u0434\u0435 PNG. \u041c\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0438, \u0447\u0442\u043e \u043f\u0443\u0442\u0451\u043c \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u0439 \u0432 \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0435 URL-\u043f\u0430\u0440\u0441\u0435\u0440\u0430\u043c\u0438 SVG-\u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 <i>librsvg<\/i> \u043c\u043e\u0436\u043d\u043e \u0432\u043d\u0435\u0434\u0440\u044f\u0442\u044c \u0432 \u0438\u0442\u043e\u0433\u043e\u0432\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0441 \u0434\u0438\u0441\u043a\u0430. \u041c\u0435\u0439\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b<br \/>  <i>librsvg<\/i> <a href=\"https:\/\/web.archive.org\/web\/20230911070144\/https:\/gitlab.gnome.org\/GNOME\/librsvg\/-\/issues\/996\">\u0431\u044b\u0441\u0442\u0440\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u043b\u0438 \u044d\u0442\u0443 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u044c<\/a>, \u0432\u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0438 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u043a\u0430\u043a <a href=\"https:\/\/web.archive.org\/web\/20230911070144\/https:\/nvd.nist.gov\/vuln\/detail\/CVE-2023-38633\">CVE-2023-38633<\/a>.<\/p>\n<p>  \u041c\u044b \u0434\u0435\u043b\u0438\u043c\u0441\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438 \u043f\u0440\u043e\u0432\u0435\u0434\u0451\u043d\u043d\u043e\u0433\u043e \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0435\u0449\u0451 \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0435\u0439, \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u044e\u0449\u0438\u0445\u0441\u044f \u0432 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 URL-\u043f\u0430\u0440\u0441\u0435\u0440\u043e\u0432, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0441 \u0443\u0447\u0451\u0442\u043e\u043c \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0439 \u043d\u0430\u043c\u0438 \u0441\u043b\u0443\u0447\u0430\u0439 \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u0442\u0440\u0443\u0434\u043d\u043e\u0443\u043b\u043e\u0432\u0438\u043c\u044b\u043c.<\/p>\n<p>  \u041e\u0442\u0434\u0435\u043b\u044c\u043d\u0430\u044f \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u043d\u043e\u0441\u0442\u044c \u043c\u0435\u0439\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0443 <i>librsvg<\/i> \u0424\u0435\u0434\u0435\u0440\u0438\u043a\u043e, \u043c\u0435\u0439\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0443 <i>libvips<\/i> \u0414\u0436\u043e\u043d\u0443 \u0438 \u043c\u0435\u0439\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0443 <a href=\"https:\/\/web.archive.org\/web\/20230911070144\/https:\/sharp.pixelplumbing.com\"><i>Sharp<\/i><\/a> \u041b\u043e\u0432\u0435\u043b\u043b\u0443 \u0437\u0430 \u043f\u0440\u043e\u0434\u0435\u043b\u0430\u043d\u043d\u0443\u044e \u0438\u043c\u0438 \u0440\u0430\u0431\u043e\u0442\u0443 \u0438 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u043e\u0442\u043a\u043b\u0438\u043a.<\/p>\n<h2><font color=\"#3AC1EF\">\u258d \u041f\u0440\u0435\u0434\u044b\u0441\u0442\u043e\u0440\u0438\u044f<\/font><\/h2>\n<p>  \u0421\u0442\u0430\u0442\u044c\u044f \u0412\u0438\u043a\u0442\u043e\u0440\u0430 \u041a\u0430\u0445\u0430\u043d\u0430 \u0438\u0437 Elttam \u043d\u0430 \u0442\u0435\u043c\u0443 <a href=\"https:\/\/web.archive.org\/web\/20230911070144\/https:\/github.com\/elttam\/publications\/blob\/master\/writeups\/inkscape-xml.md\">\u043f\u0440\u043e\u0431\u043b\u0435\u043c XML-\u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u0432 Inkscape<\/a> \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044d\u0442\u043e\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0443\u044f\u0437\u0432\u0438\u043c \u043a \u0430\u0442\u0430\u043a\u0435 \u043e\u0431\u0445\u043e\u0434\u0430 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 \u043f\u0440\u0438 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0435 SVG. \u0420\u0430\u0441\u0448\u0438\u0440\u044f\u044f \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0412\u0438\u043a\u0442\u043e\u0440\u0430, \u043c\u044b \u0432\u044b\u044f\u0441\u043d\u0438\u043b\u0438, \u0447\u0442\u043e \u0445\u043e\u0442\u044c XInclude \u0438 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 Inkscape 0.9 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043e\u043d \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435, \u043a\u043e\u0433\u0434\u0430 \u043e\u0434\u043d\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 SVG \u0432\u043b\u043e\u0436\u0435\u043d\u043e \u0432 \u0434\u0440\u0443\u0433\u043e\u0435.<\/p>\n<p>  \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u0432\u0437\u0433\u043b\u044f\u043d\u0438\u0442\u0435 \u043d\u0430 \u044d\u0442\u0443 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u044e\u044e SVG-\u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443.<\/p>\n<pre><code class=\"xml\">&lt;?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?> &lt;svg width=\"300\" height=\"300\" xmlns:xi=\"http:\/\/www.w3.org\/2001\/XInclude\">   &lt;rect width=\"300\" height=\"300\" style=\"fill:rgb(255,204,204);\" \/>   &lt;text x=\"0\" y=\"100\">     &lt;xi:include href=\"\/etc\/passwd\" parse=\"text\" encoding=\"ASCII\">       &lt;xi:fallback>file not found&lt;\/xi:fallback>     &lt;\/xi:include>   &lt;\/text> &lt;\/svg><\/code><\/pre>\n<p>  \u041c\u044b \u0437\u0430\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0435\u0451 \u0432 \u0432\u0438\u0434\u0435 URI \u0438 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u043b\u0438 \u0432 \u0434\u0440\u0443\u0433\u043e\u0435 SVG-\u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435, <i>outer.svg<\/i>.<\/p>\n<pre><code class=\"xml\">&lt;?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?> &lt;svg width=\"300\" height=\"300\" xmlns:xlink=\"http:\/\/www.w3.org\/1999\/xlink\"> &lt;image xlink:href=\"data:image\/svg;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+Cjxzdmcgd2lkdGg9IjMwMCIgaGVpZ2h0PSIzMDAiIHhtbG5zOnhpPSJodHRwOi8vd3d3LnczLm9yZy8yMDAxL1hJbmNsdWRlIj4KICA8cmVjdCB3aWR0aD0iMzAwIiBoZWlnaHQ9IjMwMCIgc3R5bGU9ImZpbGw6cmdiKDI1NSwyMDQsMjA0KTsiIC8+CiAgPHRleHQgeD0iMCIgeT0iMTAwIj4KICAgIDx4aTppbmNsdWRlIGhyZWY9Ii9ldGMvcGFzc3dkIiBwYXJzZT0idGV4dCIgZW5jb2Rpbmc9IkFTQ0lJIj4KICAgICAgPHhpOmZhbGxiYWNrPmZpbGUgbm90IGZvdW5kPC94aTpmYWxsYmFjaz4KICAgIDwveGk6aW5jbHVkZT4KICA8L3RleHQ+Cjwvc3ZnPg==\" \/> &lt;\/svg><\/code><\/pre>\n<p>  \u041f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Inkscape 0.92.4 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043b\u0430\u0441\u044c XInclude <code>fallback<\/code>.<\/p>\n<pre><code class=\"bash\">$ inkscape -f test.svg -e out.png -w 300<\/code><\/pre>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/k7\/wc\/vj\/k7wcvj-npphsppupnocg1qldxoc.png\" data-src=\"https:\/\/habrastorage.org\/webt\/k7\/wc\/vj\/k7wcvj-npphsppupnocg1qldxoc.png\"\/><\/div>\n<p>  \u0417\u0434\u0435\u0441\u044c \u043d\u0430\u0441 \u0443\u0434\u0438\u0432\u0438\u043b \u0441\u0430\u043c \u0444\u0430\u043a\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 XInclude, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u044d\u0442\u043e \u0437\u0430\u0447\u0430\u0441\u0442\u0443\u044e \u0432\u0435\u0434\u0451\u0442 \u043a \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044e \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438. \u0418 \u0445\u043e\u0442\u044f Inkscape \u0432 Canva \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f, <a href=\"https:\/\/web.archive.org\/web\/20230911070144\/https:\/gitlab.com\/inkscape\/inkscape\/-\/blob\/0.92.x\/src\/display\/cairo-utils.cpp#L230\">\u0430\u043d\u0430\u043b\u0438\u0437 \u0435\u0433\u043e \u043f\u0443\u0442\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430<\/a> \u043f\u043e\u043a\u0430\u0437\u0430\u043b, \u0447\u0442\u043e \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u044e\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"https:\/\/web.archive.org\/web\/20230911070144\/https:\/docs.gtk.org\/gdk-pixbuf\/\"><i>GdkPixbuf<\/i><\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439, \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u0434\u0435\u043b\u0435\u0433\u0438\u0440\u0443\u0435\u0442 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 SVG \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 <i>librsvg<\/i>. \u042d\u0442\u043e \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u043e\u0447\u0435\u043d\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u043f\u043e\u0442\u043e\u043c\u0443 \u043a\u0430\u043a <i>librsvg<\/i> \u0432 Canva \u0443\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f.<\/p>\n<h2><font color=\"#3AC1EF\">\u258d XInclude<\/font><\/h2>\n<p>  <a href=\"https:\/\/web.archive.org\/web\/20230911070144\/https:\/www.w3.org\/TR\/xinclude\/\">XInclude<\/a> \u2013 \u044d\u0442\u043e \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0441\u043b\u0438\u044f\u043d\u0438\u044f XML-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 XML (\u0432\u0440\u043e\u0434\u0435 SVG) \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0438\u043b\u0438 \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/tc\/js\/_k\/tcjs_kswjlzkexs8nmmhegfmdvy.png\" data-src=\"https:\/\/habrastorage.org\/webt\/tc\/js\/_k\/tcjs_kswjlzkexs8nmmhegfmdvy.png\"\/><\/div>\n<p>  \u0412 XInclude \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u0432\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430:<\/p>\n<ul>\n<li><code>xi:include<\/code>, \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0449\u0438\u0439 \u0437\u0430 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e URL, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0444\u0430\u0439\u043b\u0430 \u0438\u043b\u0438 HTTP-\u0437\u0430\u043f\u0440\u043e\u0441\u0430. \u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u043e\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u043c \u0438\u043b\u0438 XML. <\/li>\n<li><code>xi:fallback<\/code>, \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0449\u0438\u0439 \u0437\u0430 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u0434\u043b\u044f \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0438 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435, \u043a\u043e\u0433\u0434\u0430 <code>xi:Include<\/code> \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0442\u043e, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0435\u0434\u0451\u0442 \u0441\u0441\u044b\u043b\u043a\u0430.<\/li>\n<\/ul>\n<p>  \u0415\u0441\u043b\u0438 \u043d\u0435 \u0431\u0440\u0430\u0442\u044c \u0432\u043e \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438, \u0442\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 XML-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 <i>\/etc\/passwd<\/i>.<\/p>\n<pre><code class=\"xml\">&lt;?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?> &lt;example xmlns:xi=\"http:\/\/www.w3.org\/2001\/XInclude\">   &lt;xi:include href=\"\/etc\/passwd\" parse=\"text\" encoding=\"ASCII\">     &lt;xi:fallback>file not found&lt;\/xi:fallback>   &lt;\/xi:include> &lt;\/example><\/code><\/pre>\n<p>  <\/p>\n<h2><font color=\"#3AC1EF\">\u258d \u0422\u0443\u0442 \u0435\u0441\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u0430<\/font><\/h2>\n<p>  <i>librsvg<\/i> \u2013 \u044d\u0442\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 Rust \u0434\u043b\u044f \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0438 SVG-\u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u043d\u0430 \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u044f\u0445 <a href=\"https:\/\/web.archive.org\/web\/20230911070144\/https:\/www.cairographics.org\">Cairo<\/a>. \u0421\u0435\u0439\u0447\u0430\u0441 \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0435\u0451 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u043d\u0430 Rust, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043e\u043d\u0430 \u043e\u043f\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 Cairo \u0438 GNOME.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/yw\/ax\/9o\/ywax9ohgyocmopw8zot-wmwuruw.png\" data-src=\"https:\/\/habrastorage.org\/webt\/yw\/ax\/9o\/ywax9ohgyocmopw8zot-wmwuruw.png\"\/><\/div>\n<p>  \u0421\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u043f\u0440\u0435\u0434\u044b\u0441\u0442\u043e\u0440\u0438\u0438 \u043d\u0430\u043c \u0431\u044b\u043b\u043e \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u0447\u0442\u043e <i>librsvg<\/i> \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u0432 XInclude. \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u0438\u043c\u0435\u043d\u043d\u043e, \u043c\u044b <a href=\"https:\/\/web.archive.org\/web\/20230911070144\/https:\/gitlab.gnome.org\/GNOME\/librsvg\/-\/tree\/eec9d15145da5f6e2b70c5974b3e3c6ecac876e0\">\u0438\u0437\u0443\u0447\u0438\u043b\u0438 \u0435\u0451 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e<\/a>. \u0412\u044b\u044f\u0441\u043d\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u0430\u044f \u0432\u043d\u0435\u0448\u043d\u044f\u044f URL-\u0441\u0441\u044b\u043b\u043a\u0430 \u0432 SVG \u0434\u043b\u044f \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u0447\u0435\u0440\u0435\u0437 \u043e\u0434\u0438\u043d \u043c\u0435\u0442\u043e\u0434. \u0412 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u044d\u0442\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0441\u0441\u044b\u043b\u043e\u043a:<\/p>\n<ul>\n<li>&lt;image href=\u00abfile:\/\/\/web.archive.org\/web\/20230911070144\/https:\/\/something.png\u00bb \/><\/li>\n<li>&lt;rect filter=\u00aburl(&#8216;file-with-filters.svg#my_filter&#8217;)\u00bb \/><\/li>\n<li>&lt;xi:include href=&#187;\/etc\/passwd&#187;\u2026 \/><\/li>\n<\/ul>\n<p>  \u041c\u0435\u0442\u043e\u0434 <i>librsvg<\/i> <code><a href=\"https:\/\/web.archive.org\/web\/20230911070144\/https:\/gitlab.gnome.org\/GNOME\/librsvg\/-\/blob\/eec9d15145da5f6e2b70c5974b3e3c6ecac876e0\/rsvg\/src\/url_resolver.rs#L32\">url_resolver.resolve_href<\/a><\/code> \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u0440\u044f\u0434 <a href=\"https:\/\/web.archive.org\/web\/20230911070144\/https:\/gnome.pages.gitlab.gnome.org\/librsvg\/Rsvg-2.0\/class.Handle.html#security-and-locations-of-referenced-files\">\u0441\u0442\u0440\u043e\u0433\u0438\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438<\/a>, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044f, \u043a\u0430\u043a\u0438\u0435 \u0441\u0441\u044b\u043b\u043a\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u044b \u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 SVG-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430:<\/p>\n<ul>\n<li>\u0432\u0441\u0435 URL <code>data:<\/code> \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u044b, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u0441\u0441\u044b\u043b\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0432\u043d\u0435\u0448\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u044b.<\/li>\n<li>\u0441\u0445\u0435\u043c\u0430, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432\u0435\u0434\u0451\u0442 \u0441\u0441\u044b\u043b\u043a\u0430, \u0434\u043e\u043b\u0436\u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441\u0445\u0435\u043c\u0435 \u00ab\u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u00bb. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 <code>file:\/\/\/web.archive.org\/web\/20230911070144\/https:\/\/foo\/bar\/example.svg<\/code> \u043b\u044e\u0431\u043e\u0439 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u043c\u044b\u0439 URL \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441\u0445\u0435\u043c\u0435 <code>file:<\/code>.<\/li>\n<li>\u0432\u0441\u0442\u0440\u0435\u0447\u0435\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u043e\u0434\u043d\u043e\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \u0441 \u0442\u0435\u043a\u0443\u0449\u0438\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u0438\u043b\u0438 \u0432 \u0435\u0433\u043e \u043f\u043e\u0434\u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435. \u042d\u0442\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u043e\u0439 \u043f\u0443\u0442\u0438 URL.<\/li>\n<li>\u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u0445\u0435\u043c\u044b \u043e\u0442\u043a\u043b\u043e\u043d\u044f\u044e\u0442\u0441\u044f, \u0432\u043a\u043b\u044e\u0447\u0430\u044f <code>http:<\/code>.<\/li>\n<\/ul>\n<p>  \u042d\u0442\u0438 \u0441\u0442\u0440\u043e\u0433\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0441\u0442\u0430\u043b\u0438 \u043f\u0440\u0438\u0447\u0438\u043d\u043e\u0439 \u043f\u0440\u043e\u0432\u0430\u043b\u0430 \u043f\u0435\u0440\u0432\u044b\u0445 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432 XInclude. \u041d\u043e \u043d\u0430\u043c \u0437\u0430\u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0443\u0437\u043d\u0430\u0442\u044c, \u0435\u0441\u0442\u044c \u043b\u0438 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0438\u0445 \u043e\u0431\u043e\u0439\u0442\u0438. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0431\u0445\u043e\u0434\u0430 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 \u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 SVG, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0432 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 SVG, \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u044b\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u0432 PNG, \u0444\u0430\u0439\u043b\u044b \u0432\u0440\u043e\u0434\u0435 <i>\/etc\/passwd<\/i>.<\/p>\n<h2><font color=\"#3AC1EF\">\u258d \u0420\u0430\u0441\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u0441\u0435\u0440\u043e\u0432<\/font><\/h2>\n<p>  \u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 URL-\u0430\u0434\u0440\u0435\u0441\u0430 \u0432 SVG-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u0434\u0432\u0430 \u044d\u0442\u0430\u043f\u0430:<\/p>\n<ol>\n<li>\u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044f URL \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u043c \u0432\u044b\u0448\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c.<\/li>\n<li>\u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0443\u0441\u043f\u0435\u0445\u0430 \u2013 <a href=\"https:\/\/web.archive.org\/web\/20230911070144\/https:\/gitlab.gnome.org\/GNOME\/librsvg\/-\/blob\/eec9d15145da5f6e2b70c5974b3e3c6ecac876e0\/rsvg\/src\/io.rs#L87\">\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e<\/a>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u0430\u0440\u0441\u0438\u0442 URL, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0432 Gio \u043f\u0430\u0440\u0441\u0435\u0440 URI.<\/li>\n<\/ol>\n<p>  \u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b \u0438\u0437 <i><a href=\"https:\/\/web.archive.org\/web\/20230911070144\/https:\/gitlab.gnome.org\/GNOME\/librsvg\/-\/blob\/eec9d15145da5f6e2b70c5974b3e3c6ecac876e0\/rsvg\/src\/xml\/mod.rs#L509-549\">mod.rs<\/a><\/i> \u0438 <i><a href=\"https:\/\/web.archive.org\/web\/20230911070144\/https:\/gitlab.gnome.org\/GNOME\/librsvg\/-\/blob\/eec9d15145da5f6e2b70c5974b3e3c6ecac876e0\/rsvg\/src\/io.rs#L95-122\">io.rs<\/a><\/i>:<\/p>\n<pre><code class=\"xml\">\/\/ xml\/mod.rs fn acquire(&amp;self, href: Option&lt;&amp;str>, \/* ... *\/) -> Result&lt;(), AcquireError> {   let aurl = self.url_resolver.resolve_href(href) \/\/ ...   \/\/ ...   self.acquire_text(&amp;aurl, encoding); }  fn acquire_text(&amp;self, aurl: &amp;AllowedUrl, encoding: Option&lt;&amp;str>) -> Result&lt;(), AcquireError> {   let binary = io::acquire_data(aurl, None);   \/\/ ...   return result; }<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"xml\">\/\/ io.rs pub fn acquire_data(aurl: &amp;AllowedUrl, \/* ... *\/) -> Result&lt;BinaryData, IoError> {   let uri = aurl.as_str();   \/\/ ...   let file = GFile::for_uri(uri);   let (contents, _etag) = file.load_contents(cancellable)?;   \/\/ ...   return contents;   \/\/ ... }<\/code><\/pre>\n<p>  \u0417\u043d\u0430\u044f \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u043e \u0434\u0432\u0430 \u043f\u0430\u0440\u0441\u0435\u0440\u0430 (\u043e\u0434\u0438\u043d \u0434\u043b\u044f \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 URL \u0438 \u043e\u0434\u0438\u043d \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e), \u0434\u043b\u044f \u043e\u0431\u0445\u043e\u0434\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043d\u0430\u0439\u0442\u0438 URL, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u044d\u0442\u0438 \u043f\u0430\u0440\u0441\u0435\u0440\u044b \u043d\u0435 \u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u044b\u0432\u0430\u043b\u0438\u0441\u044c.<\/p>\n<p>  \u041f\u0440\u043e\u0432\u0435\u0434\u044f \u043f\u0430\u0440\u0443 \u0442\u0435\u0441\u0442\u043e\u0432, \u043c\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438, \u043a\u0430\u043a \u043f\u0430\u0440\u0441\u0435\u0440\u044b \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442 \u0440\u0430\u0437\u043d\u044b\u0435 URL.  <\/p>\n<div class=\"scrollable-table\">\n<table>\n<tbody>\n<tr>\n<td>URL<br \/>  file:\/\/\/web.archive.org\/web\/20230911070144\/https:\/\/etc\/passwd?foo=bar#baz<\/td>\n<td>\u0421\u043f\u0430\u0440\u0441\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 Rust <a href=\"https:\/\/web.archive.org\/web\/20230911070144\/https:\/docs.rs\/url\/latest\/url\/\">url<\/a><\/td>\n<\/tr>\n<tr>\n<td>\u0421\u0445\u0435\u043c\u0430<\/td>\n<td>file<\/td>\n<\/tr>\n<tr>\n<td>\u0425\u043e\u0441\u0442<\/td>\n<td>\u043d\u0435\u0442<\/td>\n<\/tr>\n<tr>\n<td>\u041f\u0443\u0442\u044c<\/td>\n<td>\/etc\/passwd<\/td>\n<\/tr>\n<tr>\n<td>\u0417\u0430\u043f\u0440\u043e\u0441<\/td>\n<td>foo=bar<\/td>\n<\/tr>\n<tr>\n<td>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442<\/td>\n<td>baz<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p><a href=\"https:\/\/web.archive.org\/web\/20230908170051\/https:\/\/docs.gtk.org\/gio\/\">Gio<\/a> \u043d\u0435 \u0440\u0430\u0441\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043f\u0430\u0440\u0441\u0438\u043d\u0433 \u043e\u0431\u043e\u0431\u0449\u0451\u043d\u043d\u043e\u0433\u043e URL-\u0430\u0434\u0440\u0435\u0441\u0430 (\u043a\u0440\u043e\u043c\u0435 GUri, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 \u043f\u0443\u0442\u0438 \u0432\u044b\u0437\u043e\u0432\u0430), \u043d\u043e \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 <code>g_filename_from_uri<\/code> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f.  <\/p>\n<div class=\"scrollable-table\">\n<table>\n<tbody>\n<tr>\n<td>URL <\/td>\n<td>\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 g_filename_from_uri <\/td>\n<\/tr>\n<tr>\n<td>file:\/\/\/web.archive.org\/web\/20230911070144\/https:\/\/etc\/passwd?foo=bar#baz<\/td>\n<td>\/etc\/passwd?foo=bar#baz<br \/>  \u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435: \u0432 <a href=\"https:\/\/web.archive.org\/web\/20230911070144\/https:\/gitlab.gnome.org\/GNOME\/glib\/-\/commit\/39864716d6404766c325caf18c6bef722dc060cd\">\u043a\u043e\u043c\u043c\u0438\u0442\u0435 Glib 3986471<\/a> \u0434\u0430\u0451\u0442 \u0441\u0431\u043e\u0439 \u0438\u0437-\u0437\u0430 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432? \u0438 #.<\/td>\n<\/tr>\n<tr>\n<td>file:\/\/\/web.archive.org\/web\/20230911070144\/https:\/\/etc\/passwd<\/td>\n<td>\/etc\/passwd<\/td>\n<\/tr>\n<tr>\n<td>file:\/\/\/web.archive.org\/web\/20230911070144\/https:\/\/etc\/passwd&amp;hello<\/td>\n<td>\/etc\/passwd&amp;hello<\/td>\n<\/tr>\n<tr>\n<td>file:\/\/\/web.archive.org\/web\/20230911070144\/https:\/\/etc\/passwd@host<\/td>\n<td>\/etc\/passwd@host<\/td>\n<\/tr>\n<tr>\n<td>file:\/\/host\/etc\/passwd<\/td>\n<td>\/etc\/passwd<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h2><font color=\"#3AC1EF\">\u258d \u041e\u0431\u0445\u043e\u0434 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438<\/font><\/h2>\n<p>  \u041f\u043e\u043d\u0438\u043c\u0430\u044f, \u0433\u0434\u0435 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u043f\u0430\u0440\u0441\u0435\u0440\u044b, \u043c\u044b \u0432\u0437\u044f\u043b\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0447\u0430\u0441\u0442\u0438 \u0438\u0437 <i>librsvg<\/i> \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043b\u0438 \u0444\u0430\u0437\u0437\u0438\u043d\u0433-\u0442\u0435\u0441\u0442\u044b (\u00abresolve\u00bb) \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043b\u043e\u0433\u0438\u043a\u0438, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u043b\u043e\u0433\u0438\u043a\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 URL, \u043f\u0440\u0438 \u0432\u0441\u0442\u0440\u0435\u0447\u0435 \u0441\u0441\u044b\u043b\u043a\u0438 (href, XInclude \u0438 \u0442.\u043f.) \u0438\u0437 \u043d\u0430\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e\u0441\u044f \u043d\u0430 \u0434\u0438\u0441\u043a\u0435 \u0444\u0430\u0439\u043b\u0430 <i>current.svg<\/i>. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u043e \u043d\u0430\u043c \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0430\u0440\u0441\u0438\u043d\u0433 \u0438 \u043b\u043e\u0433\u0438\u043a\u0430 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438. \u0412\u043e\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u0432\u044b\u0432\u043e\u0434\u044b \u0444\u0430\u0437\u0437\u0438\u043d\u0433\u0430:<\/p>\n<ul>\n<li><code>resolve 'current.svg'<\/code>: \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c.<\/li>\n<li><code>resolve run '..\/..\/..\/..\/..\/..\/..\/etc\/passwd'<\/code>: \u043a\u0430\u043d\u043e\u043d\u0438\u043a\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0432\u0430\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441 \u043e\u0448\u0438\u0431\u043a\u043e\u0439 <code>'No such file or directory<\/code>&#8216;.<\/li>\n<li><code>resolve 'current.svg?..\/..\/..\/..\/..\/..\/..\/etc\/passwd'<\/code>: \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442.<\/li>\n<li><code>resolve 'none\/..\/current.svg'<\/code>: \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c.<\/li>\n<\/ul>\n<p>  \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0434\u0432\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0438, \u0447\u0442\u043e <code>GFile::for_uri<\/code> \u0432\u043f\u043e\u043b\u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043e\u0431\u0445\u043e\u0434 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0432 \u0441\u0442\u0440\u043e\u043a\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430. \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u0432\u0442\u043e\u0440\u043e\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, <code>..\/..\/..\/..\/..\/..\/..\/etc\/passwd<\/code>, \u043f\u0440\u043e\u0432\u0430\u043b\u0438\u043b\u0441\u044f \u0438\u0437-\u0437\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043a\u0430\u043d\u043e\u043d\u0438\u043a\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<h2><font color=\"#3AC1EF\">\u258d \u041e\u0431\u0445\u043e\u0434 \u043a\u0430\u043d\u043e\u043d\u0438\u043a\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438<\/font><\/h2>\n<p>  \u0427\u0430\u0441\u0442\u044c \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 URL-\u0430\u0434\u0440\u0435\u0441\u0430 \u0432 <i>librsvg<\/i> \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u043a\u0430\u043d\u043e\u043d\u0438\u043a\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u043e\u0433\u043e URL \u0434\u043b\u044f \u0437\u0430\u043c\u0435\u043d\u044b \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u043e\u0432 <code>..<\/code> \u0438 <code>.<\/code> \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u044d\u0442\u043e, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <code><a href=\"https:\/\/web.archive.org\/web\/20230911070144\/https:\/doc.rust-lang.org\/std\/fs\/fn.canonicalize.html\">std::fs::canonicalize<\/a><\/code> (\u0432\u044b\u0437\u044b\u0432\u0430\u044f <code><a href=\"https:\/\/web.archive.org\/web\/20230911070144\/https:\/linux.die.net\/man\/3\/realpath\">realpath<\/a><\/code>), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0443, \u0435\u0441\u043b\u0438:<\/p>\n<ul>\n<li>\u043f\u0443\u0442\u044c \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442;<\/li>\n<li>\u043d\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0432 \u043f\u0443\u0442\u0438 \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u043e\u043c.<\/li>\n<\/ul>\n<p>  \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u044b \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0437\u043d\u0430\u0435\u043c \u0438\u043c\u044f \u00abcurrent\u00bb SVG \u043d\u0430 \u0434\u0438\u0441\u043a\u0435, \u0434\u043b\u044f \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 URL \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043e\u0431\u043e\u0439\u0442\u0438 \u043a\u0430\u043d\u043e\u043d\u0438\u043a\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e. \u041f\u043e\u0441\u043b\u0435 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u044b\u044f\u0441\u043d\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u044d\u0442\u043e \u043d\u0435 \u0442\u0430\u043a \u0441\u043b\u043e\u0436\u043d\u043e.<\/p>\n<pre><code class=\"bash\">$ realpath current.svg \/home\/zsims\/projects\/librsvg-poc\/current.svg  $ realpath . \/home\/zsims\/projects\/librsvg-poc\/<\/code><\/pre>\n<p>  \u041a\u0430\u043a \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, <code>realpath(\".\")<\/code> \u0438 <code>std::fs::canonicalize(\".\")<\/code> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442 \u00ab\u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u00bb. \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e \u0432 \u043d\u0430\u0448\u0435\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0435 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u0438 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u043b\u0435\u0439\u0441\u0445\u043e\u043b\u0434\u0435\u0440\u0430 \u0432\u043c\u0435\u0441\u0442\u043e <i>current.svg<\/i>.<\/p>\n<h2><font color=\"#3AC1EF\">\u258d \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u0438<\/font><\/h2>\n<p>  \u041f\u043e\u043d\u0438\u043c\u0430\u044f, \u0432 \u0447\u0451\u043c \u0440\u0430\u0441\u0445\u043e\u0434\u044f\u0442\u0441\u044f URL-\u043f\u0430\u0440\u0441\u0435\u0440\u044b, \u0438 \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u043e\u0439\u0442\u0438 \u043a\u0430\u043d\u043e\u043d\u0438\u043a\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e, \u043d\u0435 \u0437\u043d\u0430\u044f \u0438\u043c\u0435\u043d\u0438 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0444\u0430\u0439\u043b\u0430, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u0443\u044e \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0434\u043b\u044f \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f <i>\/etc\/passwd<\/i>.<\/p>\n<pre><code class=\"bash\">.?..\/..\/..\/..\/..\/..\/..\/etc\/passwd<\/code><\/pre>\n<p>  \u0412\u043d\u0443\u0442\u0440\u0438 <i>poc.svg<\/i> \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"xml\">&lt;?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?> &lt;svg width=\"300\" height=\"300\" xmlns:xi=\"http:\/\/www.w3.org\/2001\/XInclude\">   &lt;rect width=\"300\" height=\"300\" style=\"fill:rgb(255,204,204);\" \/>   &lt;text x=\"0\" y=\"100\">     &lt;xi:include href=\".?..\/..\/..\/..\/..\/..\/..\/etc\/passwd\" parse=\"text\" encoding=\"ASCII\">       &lt;xi:fallback>file not found&lt;\/xi:fallback>     &lt;\/xi:include>   &lt;\/text> &lt;\/svg><\/code><\/pre>\n<p>  \u0418 \u0434\u0430\u0451\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0432\u044b\u0432\u043e\u0434:<\/p>\n<pre><code class=\"bash\">$ rsvg-convert poc.svg > poc.png<\/code><\/pre>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/hg\/go\/ub\/hggoubdul0fuobm5zdi0ydid79y.png\" data-src=\"https:\/\/habrastorage.org\/webt\/hg\/go\/ub\/hggoubdul0fuobm5zdi0ydid79y.png\"\/><\/div>\n<p>  \u041f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u0447\u0435\u0440\u0435\u0437 <i>vipsthumbnail<\/i> \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442.<\/p>\n<p>  \u0427\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0432 <i>\/proc<\/i>, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a <i>\/proc\/self\/environ<\/i>, \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0438\u0437-\u0437\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0439 \u0432 \u043d\u0438\u0445 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0438 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432.<\/p>\n<pre><code class=\"bash\">$ rsvg-convert proc-poc.svg > proc-poc.png thread 'main' panicked at 'str::ToGlibPtr&lt;*const c_char>: unexpected '' character: NulError(21...<\/code><\/pre>\n<p>  \u0417\u0430\u043c\u0435\u0442\u044c\u0442\u0435, \u0447\u0442\u043e \u044d\u0442\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0430\u043c, \u0433\u0434\u0435 SVG \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044f \u0438\u0437 <code>file:\/\/<\/code>. SVG, \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c\u044b\u0435 \u0447\u0435\u0440\u0435\u0437 \u0441\u0445\u0435\u043c\u044b <code>data:<\/code> \u0438\u043b\u0438 <code>resource:<\/code>, \u043d\u0435\u0443\u044f\u0437\u0432\u0438\u043c\u044b.<\/p>\n<h2><font color=\"#3AC1EF\">\u258d \u041f\u0430\u0442\u0447<\/font><\/h2>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u043e\u0442\u0447\u0451\u0442\u0430 (<a href=\"https:\/\/web.archive.org\/web\/20230911070144\/https:\/gitlab.gnome.org\/GNOME\/librsvg\/-\/issues\/996\">Issue 996<\/a>) \u043c\u0435\u0439\u043d\u0442\u0435\u0439\u043d\u0435\u0440 <i>librsvg<\/i> \u0424\u0435\u0434\u0435\u0440\u0438\u043a\u043e <a href=\"https:\/\/web.archive.org\/web\/20230911070144\/https:\/gitlab.gnome.org\/GNOME\/librsvg\/-\/merge_requests\/861\">\u043f\u0440\u043e\u043f\u0430\u0442\u0447\u0438\u043b \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u044c<\/a> \u043f\u0443\u0442\u0451\u043c \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 URL \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 GFile \u043f\u0440\u043e\u0448\u0435\u0434\u0448\u0435\u0433\u043e \u044d\u0442\u0443 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044e URL. \u041e\u0442\u0432\u0435\u0442 \u0424\u0435\u0434\u0435\u0440\u0438\u043a\u043e \u0432\u043a\u043b\u044e\u0447\u0430\u043b \u043f\u0440\u043e\u0441\u044c\u0431\u0443 \u043a \u043c\u0435\u0439\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u043c Sharp \u0438 libvips \u0432\u043d\u0435\u0441\u0442\u0438 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043e \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u043f\u043e\u0434 \u043a\u043e\u0434\u043e\u043c <a href=\"https:\/\/web.archive.org\/web\/20230911070144\/https:\/nvd.nist.gov\/vuln\/detail\/CVE-2023-38633\">CVE-2023-38633<\/a>.<\/p>\n<p>  \u0414\u0430\u043d\u043d\u0430\u044f \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u044c \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0440\u043e\u0434\u0438\u043b\u0430 \u0434\u0438\u0441\u043a\u0443\u0441\u0441\u0438\u044e \u043d\u0430 \u0442\u0435\u043c\u0443 \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430<a href=\"https:\/\/web.archive.org\/web\/20230911070144\/https:\/gitlab.gnome.org\/GNOME\/glib\/-\/issues\/3050\"> URL-\u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u0432 <i>glib<\/i><\/a>, \u0447\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u043b\u043e \u043a \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 \u044d\u0442\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 <a href=\"https:\/\/web.archive.org\/web\/20230911070144\/https:\/gitlab.gnome.org\/GNOME\/glib\/-\/merge_requests\/3502\">\u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438<\/a>.<\/p>\n<p>  \u0412 \u0445\u043e\u0434\u0435 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0438 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u044f\u0440\u043a\u0438\u043c\u0438 \u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b:<\/p>\n<ul>\n<li>\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c <a href=\"https:\/\/web.archive.org\/web\/20230911070144\/https:\/daniel.haxx.se\/blog\/2022\/01\/10\/dont-mix-url-parsers\/\">\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0430\u0437\u043d\u044b\u0445 URL-\u043f\u0430\u0440\u0441\u0435\u0440\u043e\u0432<\/a> \u0432 \u0442\u043e\u0439 \u0436\u0435 \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f URL <code>file:\/\/<\/code> \u0438 \u0432\u043d\u0443\u0442\u0440\u0438\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f, \u0432 \u043a\u0430\u043a\u043e\u0439 \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0438 URL <code>http:\/\/<\/code>.<\/li>\n<li>URL <code>file:\/\/<\/code> \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u044b\u043c\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 URL \u043f\u043e\u0434\u0447\u0451\u0440\u043a\u0438\u0432\u0430\u0435\u0442\u0441\u044f <a href=\"https:\/\/web.archive.org\/web\/20230911070144\/https:\/url.spec.whatwg.org#file-state\">\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0441\u0442\u0440\u043e\u043a \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432 \u0430\u0434\u0440\u0435\u0441\u0430\u0445<\/a> <code>file:\/\/<\/code>, \u043d\u043e \u0432 \u0438\u0437\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u043d\u0430\u043c\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f\u0445 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0441\u0438\u043b\u044c\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u043b\u0430\u0441\u044c.<\/li>\n<li>\u0443\u0441\u0438\u043b\u0438\u044f \u043f\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u043a\u043e\u0434\u0430 \u0421\u0438 \u0432 \u043a\u043e\u0434 Rust \u0441\u043e\u043f\u0440\u044f\u0436\u0435\u043d\u044b \u0441 \u0440\u0438\u0441\u043a\u043e\u043c. \u0418 \u0445\u043e\u0442\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u043f\u0430\u043c\u044f\u0442\u0438 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0432\u044b\u0441\u0438\u043b\u0430\u0441\u044c, \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f \u0432 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430\u0445 (\u0432\u0440\u043e\u0434\u0435 \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 URL) \u043c\u043e\u0433\u0443\u0442 \u0441\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043d\u0435\u0439 \u043d\u0435\u0433\u0430\u0442\u0438\u0432\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c.<\/li>\n<li>\u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c, \u0447\u0442\u043e\u0431\u044b URL \u043f\u0430\u0440\u0441\u0438\u043b\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u0440\u0430\u0437, \u0438 \u0434\u0430\u043b\u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. <\/li>\n<li>\u043f\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043d\u0443\u0436\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044e \u0444\u0430\u0439\u043b\u043e\u0432, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a SVG, \u0434\u043e \u0438\u0445 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438. \u041f\u043e \u044d\u0442\u043e\u0439 \u043f\u0440\u0438\u0447\u0438\u043d\u0435 <a href=\"https:\/\/web.archive.org\/web\/20230911070144\/https:\/www.mediawiki.org\/wiki\/MediaWiki\">MediaWiki<\/a> \u043d\u0435 \u043f\u043e\u0434\u0432\u0435\u0440\u0436\u0435\u043d\u0430 \u0434\u0430\u043d\u043d\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0435, \u0442\u0430\u043a \u043a\u0430\u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b <code>xi:include<\/code> \u043e\u0442\u043a\u043b\u043e\u043d\u044f\u044e\u0442\u0441\u044f \u0434\u043e \u0442\u043e\u0433\u043e, \u043a\u0430\u043a SVG \u0434\u043e\u0441\u0442\u0438\u0433\u0430\u0435\u0442 <i>librsvg<\/i>.<\/li>\n<\/ul>\n<p>  <\/p>\n<h2><font color=\"#3AC1EF\">\u258d \u0425\u0440\u043e\u043d\u043e\u043b\u043e\u0433\u0438\u044f<\/font><\/h2>\n<p>  <\/p>\n<ul>\n<li>11 \u0438\u044e\u043b\u044f 2023: \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430;<\/li>\n<li>12 \u0438\u044e\u043b\u044f 2023: \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u0430 \u043c\u0435\u0439\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u043c <i>librsvg<\/i>.<\/li>\n<li>19 \u0438\u044e\u043b\u044f 2023: \u043c\u0435\u0439\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b <i>librsvg<\/i> \u0441\u043e\u043e\u0431\u0449\u0430\u044e\u0442 \u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0435 \u043c\u0435\u0439\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a, \u0432\u043a\u043b\u044e\u0447\u0430\u044f <i><a href=\"https:\/\/web.archive.org\/web\/20230911070144\/https:\/github.com\/libvips\/libvips\">libvips<\/a><\/i> \u0438 <i><a href=\"https:\/\/web.archive.org\/web\/20230911070144\/https:\/github.com\/lovell\/sharp\">Sharp<\/a><\/i>.<\/li>\n<li>21 \u0438\u044e\u043b\u044f 2023: <i>librsvg<\/i> \u043f\u0440\u043e\u043f\u0430\u0442\u0447\u0435\u043d\u0430.<\/li>\n<li>22 \u0438\u044e\u043b\u044f 2023 \u2013 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u044c \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u043f\u043e\u0434 \u043a\u043e\u0434\u043e\u043c CVE-2023-38633.<\/li>\n<\/ul>\n<p>  <\/p>\n<blockquote><p><b><font color=\"#3AC1EF\"><a href=\"https:\/\/t.me\/ruvds_community\">Telegram-\u043a\u0430\u043d\u0430\u043b \u0441 \u0440\u043e\u0437\u044b\u0433\u0440\u044b\u0448\u0430\u043c\u0438 \u043f\u0440\u0438\u0437\u043e\u0432, \u043d\u043e\u0432\u043e\u0441\u0442\u044f\u043c\u0438 IT \u0438 \u043f\u043e\u0441\u0442\u0430\u043c\u0438 \u043e \u0440\u0435\u0442\u0440\u043e\u0438\u0433\u0440\u0430\u0445 ?\ufe0f<\/a><\/font><\/b><\/p><\/blockquote>\n<p><a href=\"http:\/\/ruvds.com\/ru-rub?utm_source=habr&amp;utm_medium=article&amp;utm_campaign=Bright_Translate&amp;utm_content=kogda_parsery_url_adresov_rasxodyatsya_cve_2023_38633\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/tp\/sk\/z-\/tpskz-7w7a8e74isoowuep40xeg.png\" data-src=\"https:\/\/habrastorage.org\/webt\/tp\/sk\/z-\/tpskz-7w7a8e74isoowuep40xeg.png\"\/><\/a><\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/760766\/\"> https:\/\/habr.com\/ru\/articles\/760766\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\"><a href=\"https:\/\/habr.com\/ru\/companies\/ruvds\/articles\/760766\/\"><\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/mh\/rp\/5n\/mhrp5n6l_w9lqyaki7-fgh3kln4.png\" data-src=\"https:\/\/habrastorage.org\/webt\/mh\/rp\/5n\/mhrp5n6l_w9lqyaki7-fgh3kln4.png\"\/><\/div>\n<p><\/a><br \/>  \u041e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0438 \u0440\u0430\u0437\u0431\u043e\u0440 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438 CVE-2023-38633 \u0432 <i>librsvg<\/i>, \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u044e\u0449\u0435\u0439\u0441\u044f \u0432 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438, \u043a\u043e\u0433\u0434\u0430 \u0434\u0432\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 URL-\u043f\u0430\u0440\u0441\u0435\u0440\u0430 (Rust \u0438 Glib) \u0440\u0430\u0441\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0435 \u0441\u0445\u0435\u043c\u044b \u0444\u0430\u0439\u043b\u0430, \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u044f \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u044c \u043a \u0430\u0442\u0430\u043a\u0435 \u043e\u0431\u0445\u043e\u0434\u0430 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-354778","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/354778","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=354778"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/354778\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=354778"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=354778"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=354778"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}