-
-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with URL Escaping #1965
Comments
I caught another instance of this. In that case there is a link that starts with
In the original webpage that is bookmarked, the image is linked as <figure class="image_container float_right">
<a href="files/somefolder/myimage.jpg" data-lightbox="8e0113">
<img src="assets/images/0/myimage.jpg" width="800" height="521" alt="">
</a>
</figure> so apart from the lightbox there is nothing particularly curious about this... Still, for every background job attempt from Bookmarks I get an error logged in NC. |
...and the lightbox is a jquery colorbox: <script src="assets/jquery/colorbox/1.6.1/js/colorbox.min.js"></script>
<script>
(function($) {
$(document).ready(function() {
$('a[data-lightbox]').map(function() {
$(this).colorbox({
// Put custom options here
maxWidth:'90%',
maxHeight:'90%',
loop:false,
rel:$(this).attr('data-lightbox')
});
});
});
})(jQuery);
</script> |
//null
can not start with a //
.
I have found another instance of this issue, but in this case it is more clear what the issue is: apparently the URL string is not escaped when passed around and parsed, in the instance I found now there was a literal space
The URL passed around is @marcelklehr would you mind to take a look? |
I have again a bookmark with this issue. According to the trace, the issue appears in this call: https://github.com/nextcloud/bookmarks/blob/master/lib/Service/CrawlService.php#L119-L128 However, according to the linked issue above, the problem is not in FiveFilters, because the $config = new Configuration();
$config
->setFixRelativeURLs(true)
->setOriginalURL($bookmark->getUrl())
->setSubstituteEntities(true);
$readability = new Readability($config); In any case, the |
Hey @simonspa! I'm sorry for leaving you out in the cold on this one. Taking a look now. |
It would appear the problematic URL with the space can't be fixed because the website appears to be using a srcset attribute where whitespace is significant (used to separate multiple URLs). That's a bug in the website. |
I've extended the catch handler to cover whatever Readability might throw. |
Cool, thanks a lot @marcelklehr ! 😻 |
Describe the bug
Yesterday I started to see the log message below in the NC logs for every cron background job iteration run on the server. I am not aware of any changes to the system (i.e. no updates or similar) so I would expect this to be from some user data - but the log message doesn't say mutch.
To be hones, I'm not even sure it is an issue with Bookmarks, but that's most prominently show in the error log.
Server (please complete the following information):
Additional context
Add any other context about the problem here.
Nextcloud log (nextcloud/data/nextcloud.log)
The text was updated successfully, but these errors were encountered: