Skip to content

Commit

Permalink
fixup! hs-v3: Load all client auth keys to the service
Browse files Browse the repository at this point in the history
  • Loading branch information
dgoulet-tor committed Sep 5, 2018
1 parent 9f715d5 commit 67fa226
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/feature/hs/hs_service.c
Expand Up @@ -1102,15 +1102,13 @@ client_filename_is_valid(const char *filename)
{
int ret = 1;
const char *valid_extension = ".auth";
const char *valid_extension_position = filename + strlen(filename)
- strlen(valid_extension);

tor_assert(filename);

/* The length of the filename must be greater than the length of the
* extension and the valid extension must be at the end of filename. */
if (strlen(filename) > strlen(valid_extension) &&
strstr(filename, valid_extension) == valid_extension_position) {
/* The file extension must match and the total filename length can't be the
* length of the extension else we do not have a filename. */
if (!strcmpend(filename, valid_extension) &&
strlen(filename) != strlen(valid_extension)) {
ret = 1;
} else {
ret = 0;
Expand Down

0 comments on commit 67fa226

Please sign in to comment.