<p></p>
<blockquote>
<p dir="auto">As I've stated, I think this PR is reasonable and would support merging it with a few minor changes.</p>
<ul dir="auto">
<li>
<p dir="auto">Add some comments to make clear to people staring at the code in the future what the intended behavior is.</p>
<ul dir="auto">
<li>
<p dir="auto">To note that <code>g_file_get_relative_path</code> does not create <code>..</code> paths.</p>
</li>
<li>
<p dir="auto">To make clear that the purpose of lines 1290-1298 is to unpack relative paths for project files.  (similar to the comment at 368-369)</p>
</li>
<li>
<p dir="auto">To note that non-project relative paths are not handled at this time (so people working on config/session split will know what to do when refactoring this code).</p>
</li>
</ul>
</li>
<li>
<p dir="auto">Add a check to drop paths with <code>..</code> to prevent access to files outside the project folder.</p>
<ul dir="auto">
<li>Even though this PR doesn't write relative paths in certain ways, session and project files can be edited externally or another PR may change it.</li>
</ul>
</li>
</ul>
</blockquote>
<p dir="auto">With this I'll probably wait for a review of someone who might want to merge it - in the past we didn't add comments to things that were pretty obvious from the code and while it may be your personal preference, it may not be the preference of the maintainer. I also don't see a reason to check for <code>..</code> - the current code doesn't store paths outside the base directory as relative so these won't be stored. And if we ever decide to store them this way, why prevent opening them?</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/pull/3021#issuecomment-980718553">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJZYDPCALF4WUAHOL7DUOEGIXANCNFSM5IYZ3XZA">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub">Android</a>.
<img src="https://github.com/notifications/beacon/AAIOWJZG4PEC5KXSRJMJV33UOEGIXA5CNFSM5IYZ3XZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOHJ2JHWI.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/pull/3021#issuecomment-980718553",
"url": "https://github.com/geany/geany/pull/3021#issuecomment-980718553",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>