<feed xmlns='http://www.w3.org/2005/Atom'>
<title>xavi/slcl/main.c, branch v0.1.0-rc2</title>
<subtitle>Small and lightweight cloud storage written in C99 and POSIX.1-2008.
</subtitle>
<id>https://gitea.privatedns.org/xavi/slcl/atom?h=v0.1.0-rc2</id>
<link rel='self' href='https://gitea.privatedns.org/xavi/slcl/atom?h=v0.1.0-rc2'/>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/slcl/'/>
<updated>2023-09-15T23:46:07+00:00</updated>
<entry>
<title>main.c: Refactor calls to handler_add</title>
<updated>2023-09-15T23:46:07+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi.dcr@tutanota.com</email>
</author>
<published>2023-09-15T23:46:07+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/slcl/commit/?id=b2037fea902cca2dd0238a1116b05480ef29b3d6'/>
<id>urn:sha1:b2037fea902cca2dd0238a1116b05480ef29b3d6</id>
<content type='text'>
</content>
</entry>
<entry>
<title>main.c: Remove string duplication in get_forms</title>
<updated>2023-09-09T00:34:26+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi.dcr@tutanota.com</email>
</author>
<published>2023-09-09T00:30:37+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/slcl/commit/?id=e81d1f6312de85e5640277f5968263aa8cd393db'/>
<id>urn:sha1:e81d1f6312de85e5640277f5968263aa8cd393db</id>
<content type='text'>
slweb now assumes application/x-www-form-urlencoded-data as text, so it
now returns a null-terminated string on struct http_post member "data".
This removes the need for slcl to call strdup(3) in order to obtain a
null-terminated string.
</content>
</entry>
<entry>
<title>Check directory on uploads</title>
<updated>2023-09-08T22:50:22+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi.dcr@tutanota.com</email>
</author>
<published>2023-09-08T22:47:14+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/slcl/commit/?id=fcef3b99b86312aaeb9e1cae88179abbfda90dff'/>
<id>urn:sha1:fcef3b99b86312aaeb9e1cae88179abbfda90dff</id>
<content type='text'>
For historical reasons, slweb used to check for a name called "dir" on
multipart/form-data POST requests. However, stricly speaking this is
application logic, so it has been now moved from slweb to slcl.

This has resulted in a couple of breaking changes in slweb that had to
be updated on slcl.
</content>
</entry>
<entry>
<title>main.c: Return 1 on null buffer</title>
<updated>2023-09-08T22:15:39+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi.dcr@tutanota.com</email>
</author>
<published>2023-09-08T22:15:39+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/slcl/commit/?id=df873a988ca42d79d87acac160fdab797cb3d16d'/>
<id>urn:sha1:df873a988ca42d79d87acac160fdab797cb3d16d</id>
<content type='text'>
Malformed POST requests might include no payload data. However, this is
not considered a fatal error, but wrong user input.
</content>
</entry>
<entry>
<title>Adapt to slweb's include paths</title>
<updated>2023-07-20T23:40:55+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi.dcr@tutanota.com</email>
</author>
<published>2023-07-20T23:24:10+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/slcl/commit/?id=e49f1da7aed6894c8893cf29c33c4ca839d74976'/>
<id>urn:sha1:e49f1da7aed6894c8893cf29c33c4ca839d74976</id>
<content type='text'>
slweb puts its header files into its own directory in order to avoid
potential name clashing.
</content>
</entry>
<entry>
<title>Limit amount of search results</title>
<updated>2023-07-11T11:27:49+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi.dcr@tutanota.com</email>
</author>
<published>2023-07-11T11:11:50+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/slcl/commit/?id=38f3f82a77ed4782a9c4e1b4e5a6d9d4c71390a2'/>
<id>urn:sha1:38f3f82a77ed4782a9c4e1b4e5a6d9d4c71390a2</id>
<content type='text'>
When a user enters a search term that is too generic, slcl would
generate a long list of search results, where this generation could have
a big impact on the server performance and its available resources.

Therefore, it is reasonable to limit the number of search results to an
arbitrary limit, so that users are forced to enter a more specific
search term in order to achieve more relevant results.
</content>
</entry>
<entry>
<title>cftw: Allow user callback to stop recursive search</title>
<updated>2023-07-11T11:27:49+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi.dcr@tutanota.com</email>
</author>
<published>2023-07-11T11:08:06+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/slcl/commit/?id=59e17afe291f9df52d2334b92e88a889c2fe8f6a'/>
<id>urn:sha1:59e17afe291f9df52d2334b92e88a889c2fe8f6a</id>
<content type='text'>
So far, cftw would search through all directories and files recursively,
until all objects are processed. However, it is interesting for the user
callback to be able to stop this process under specific circumstances.

Now, cftw will pass a pointer to a bool, initialised to false by
default, that can be optionally assigned to true by the user
callback.

Future commits will make use of this feature. For example, this will be
used to limit the number of search results when a user enters a search
term that is too generic and would otherwise generate a large amount of
search results.
</content>
</entry>
<entry>
<title>main.c: Use path_isrel for search terms</title>
<updated>2023-07-11T11:27:49+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi.dcr@tutanota.com</email>
</author>
<published>2023-07-11T11:26:06+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/slcl/commit/?id=48b171335c213091cdf682c98ad784dc5c8456da'/>
<id>urn:sha1:48b171335c213091cdf682c98ad784dc5c8456da</id>
<content type='text'>
Search terms cannot use the same strict rules used for filenames or
directory names, as otherwise examples such as "*folder*/*IMG*" would
not work.
</content>
</entry>
<entry>
<title>Allow admins to define their own stylesheet</title>
<updated>2023-07-10T23:49:12+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi.dcr@tutanota.com</email>
</author>
<published>2023-07-10T23:20:39+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/slcl/commit/?id=e79e955d93e24a192c9bf94181294d0797e9fded'/>
<id>urn:sha1:e79e955d93e24a192c9bf94181294d0797e9fded</id>
<content type='text'>
slcl used to provide a hardcoded stylesheet. However, it would be
desirable for some admins to provide a custom stylesheet without having
to rebuild the application.

Now, slcl creates a default stylesheet, namely style.css, into the
target directory, that can be later modified by admins.

While this might contradict the suckless philosophy a bit, hopefully
some admins might find this new feature useful.
</content>
</entry>
<entry>
<title>main.c: Disallow invalid filenames or directory names</title>
<updated>2023-07-09T03:54:53+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi.dcr@tutanota.com</email>
</author>
<published>2023-07-09T02:41:55+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/slcl/commit/?id=b5282b23653b3a46ab6ae2d84049abadcc8a8a1d'/>
<id>urn:sha1:b5282b23653b3a46ab6ae2d84049abadcc8a8a1d</id>
<content type='text'>
- Relative paths must not be used for filenames or directory names,
such as "..", "." or "dir/..".
- Paths with asterisks ('*') must not be allowed, to avoid confusion
with wildcard expressions.
</content>
</entry>
</feed>
