Skip to content

Commit

Permalink
fix: handle trailing slash in Wallabag url
Browse files Browse the repository at this point in the history
Closes #2
  • Loading branch information
Joedmin committed Oct 24, 2024
1 parent 0bdfa23 commit 34ea8c5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Controllers/wallabagButtonController.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@ public function requestAccessAction(): void
$username = Minz_Request::paramString('username');
$password = Minz_Request::paramString('password');

// TODO: handle leading slash in url
// Handle leading slash
if (substr($instance_url, -1) == '/')
{
$instance_url = substr($instance_url, 0, -1);
}

FreshRSS_Context::userConf()->_attribute('wallabag_instance_url', $instance_url);
FreshRSS_Context::userConf()->_attribute('wallabag_username', $username);
FreshRSS_Context::userConf()->_attribute('wallabag_client_id', $client_id);
Expand Down

0 comments on commit 34ea8c5

Please sign in to comment.