<feed xmlns='http://www.w3.org/2005/Atom'>
<title>xavi/slcl/main.c, branch search</title>
<subtitle>Small and lightweight cloud storage written in C99 and POSIX.1-2008.
</subtitle>
<id>https://gitea.privatedns.org/xavi/slcl/atom?h=search</id>
<link rel='self' href='https://gitea.privatedns.org/xavi/slcl/atom?h=search'/>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/slcl/'/>
<updated>2023-06-05T23:55:05+00:00</updated>
<entry>
<title>WIP search</title>
<updated>2023-06-05T23:55:05+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi.dcr@tutanota.com</email>
</author>
<published>2023-05-28T10:58:26+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/slcl/commit/?id=2648076370b06752a3c3fe70dc47868b66ced7fa'/>
<id>urn:sha1:2648076370b06752a3c3fe70dc47868b66ced7fa</id>
<content type='text'>
wildcard_cmp: Allow case-insensitive searches
</content>
</entry>
<entry>
<title>http.c: Decode URL resource and parameters separately</title>
<updated>2023-05-01T02:13:25+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi.dcr@tutanota.com</email>
</author>
<published>2023-04-30T21:43:10+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/slcl/commit/?id=7d1e41f9c51bc1525e5b0c86b9832562d65675c1'/>
<id>urn:sha1:7d1e41f9c51bc1525e5b0c86b9832562d65675c1</id>
<content type='text'>
Given the following contrived example request:

/example%FB%DC&amp;arg%DE1=examplevalue%AA

slcl must decode each token separately, so that percent-encoded
characters '&amp;', '=' or '?' do not get accidently intepreted.
</content>
</entry>
<entry>
<title>Fix missing error checks for strtoul(3)</title>
<updated>2023-05-01T02:13:25+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi.dcr@tutanota.com</email>
</author>
<published>2023-04-30T20:12:57+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/slcl/commit/?id=401c5dcf444b50d4fffa66f790aa0ee6a919a967'/>
<id>urn:sha1:401c5dcf444b50d4fffa66f790aa0ee6a919a967</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Implement file previews</title>
<updated>2023-04-23T03:19:27+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi.dcr@tutanota.com</email>
</author>
<published>2023-04-23T03:19:27+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/slcl/commit/?id=fa997aa2c153cef50941b4d4036694485259ac2a'/>
<id>urn:sha1:fa997aa2c153cef50941b4d4036694485259ac2a</id>
<content type='text'>
When using HTTP "Content-Disposition: attachment;", users are forced to
download files in order to use them, whereas others might prefer to open
them in the browser.

Therefore, now that URL parameters are supported by http.h, previews can
be forced by adding "preview=1" or "preview=true" (case-insensitive) as
a URL parameters. Any other parameters are ignored by slcl.

For users, a "Preview" link has been added next to the "Share" button
for each file.
</content>
</entry>
<entry>
<title>main.c: Use S_ISDIR in ensure_dir</title>
<updated>2023-03-25T08:49:24+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi.dcr@tutanota.com</email>
</author>
<published>2023-03-25T08:49:24+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/slcl/commit/?id=09a157d307f3dd766912a203347069b11fed1aa1'/>
<id>urn:sha1:09a157d307f3dd766912a203347069b11fed1aa1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Define _POSIX_C_SOURCE</title>
<updated>2023-03-24T01:49:11+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi.dcr@tutanota.com</email>
</author>
<published>2023-03-24T01:47:11+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/slcl/commit/?id=b3ef22ac2ae126951c5b74003c7b17189c0ecbbb'/>
<id>urn:sha1:b3ef22ac2ae126951c5b74003c7b17189c0ecbbb</id>
<content type='text'>
This allows using the default compiler defined by make(1) (i.e.,
c99(1)), thus improving POSIX compatibility.
</content>
</entry>
<entry>
<title>Send response on quota exceeded</title>
<updated>2023-03-20T09:57:20+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi.dcr@tutanota.com</email>
</author>
<published>2023-03-20T02:32:00+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/slcl/commit/?id=d9bb874591c63f2efbfc1c4c953934251c700e9f'/>
<id>urn:sha1:d9bb874591c63f2efbfc1c4c953934251c700e9f</id>
<content type='text'>
So far, slcl would just close the connection with a client when the
Content-Length of an incoming request exceeded the user quota, without
any meaningful information given back to the user.

Now, slcl responds with a HTML file with meaningful information about
the error.

Limitations:

- While this commits has been successfully tested on ungoogled-chromium,
LibreWolf (and I assume Firefox and any other derivates too) does not
seem to receive the response from the server.
    - However, this issue only occurred during local testing, but not
on remote instances.
</content>
</entry>
<entry>
<title>main.c: Fix double free(3) and refactor form handling</title>
<updated>2023-03-19T22:58:03+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi.dcr@tutanota.com</email>
</author>
<published>2023-03-19T12:08:09+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/slcl/commit/?id=66bc98275f24935b2d609ce9c98de5c3b73c6dd3'/>
<id>urn:sha1:66bc98275f24935b2d609ce9c98de5c3b73c6dd3</id>
<content type='text'>
- When a non-empty username and an empty password was given, slcl would
crash due to a double free(3). This happened because append_form would
grow the form list before sanitizing the input and, since the output
pointer was not updated to the caller function, the latter would attempt
to free a now-old pointer.
- Additionally, some compilers such as clang complained about the
potential use of an uninitialized variable when calling forms_free.
- Also, it was a good opportunity to refactor get_forms and its caller
functions, as get_forms was not differentiate fatal errors from user
input errors.
</content>
</entry>
<entry>
<title>main.c: Fix undefined value for cur</title>
<updated>2023-03-16T01:23:05+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi.dcr@tutanota.com</email>
</author>
<published>2023-03-16T01:23:05+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/slcl/commit/?id=9624e8114408b96ac96675191ae2e34b0e403ee1'/>
<id>urn:sha1:9624e8114408b96ac96675191ae2e34b0e403ee1</id>
<content type='text'>
As otherwise reported by clang 14.0.0:

main.c:679:14: warning: variable 'cur' is used uninitialized whenever '&amp;&amp;' condition is false [-Wsometimes-uninitialized]
    else if (available &amp;&amp; quota_current(a, username, &amp;cur))

This was a minor issue after all, as pq was not used unless available
were set.
</content>
</entry>
<entry>
<title>main.c: Ensure essential directories on startup</title>
<updated>2023-03-16T00:46:49+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi.dcr@tutanota.com</email>
</author>
<published>2023-03-16T00:46:49+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/slcl/commit/?id=7e2e37d40ac130079570a4f8111d4d5ca5fc9344'/>
<id>urn:sha1:7e2e37d40ac130079570a4f8111d4d5ca5fc9344</id>
<content type='text'>
So far, slcl failed with poorly described error messages when any of the
essential directories were missing. Now, these are created automatically
so that the initial setup is easier.
</content>
</entry>
</feed>
