Hi Mario,

thanks for the Unix path fix tip, I'll add it to the next update of Timimi 
too.

I'll have a closer look at other info too; a quick note for now: could you 
fix the url calculation to support non-ASCII paths like I've introduced in 
Timimi 
<https://github.com/ibnishak/Timimi/blob/master/addon-firefox/patch-classic-io.js#L5>?
 
(note encodeURIComponent instead of escape there, in my tests limited to 
Windows that fixed loading from paths containing non-ASCII symbols and 
didn't broke anything) Yeah, those bugs and fixes are scattered among 
various solutions.. that reminds me again that we need docs 
<https://groups.google.com/forum/#!topic/TiddlyWikiDev/e8hAHYLWUbQ>/common 
codebase for this, I'll definitely return to that at some point.

Best regards,
Yakov.

четверг, 29 августа 2019 г., 10:47:06 UTC+3 пользователь PMario написал:
>
> On Wednesday, August 28, 2019 at 10:29:42 PM UTC+2, Yakov wrote:
> ...
>
>> As for your initial problem, try to disable 
>> security.fileuri.strict_origin_policy option in your FF's about:config. 
>>
>
> Not everyone is comfortable disabling "security" related settings, since 
> there is a reason for them, as BJ pointed out: 
> https://www.mozilla.org/en-US/security/advisories/mfsa2019-21/#CVE-2019-11730
>  
>
>> I suspect that the culprit is recreateOriginal 
>> <https://github.com/TiddlyWiki/TiddlyWiki/blob/master/js/Saving.js#L105> 
>> which doesn't take into account some aspects of saver plugins;
>>
>
> With the fix, that I implemented this workaround is not called anymore, 
> since the intended function 
> <https://github.com/pmario/file-backups/blob/d66599f3372de6163db847bf7da9cddcf3c3724d/assets/classic/inject.js#L47>
>  
> is called and succeeds. 
>
> And yes. It seems recreateOriginal causes a backwards compatibility 
> problem, with every TiddlyFox compatible saver addOn. ... The original 
> TiddlyFox addOn did create a DOM element named: tiddlyfox-message-box
>
> At the init-phase of the AddOn startup, we check for the existence of this 
> element and add a marker. So other AddOns, that know about it, can print a 
> message, that only 1 saver addOn can be active at the same time. If an 
> other SW is detected, the add-on disables itself. ... see my addOn code 
> <https://github.com/pmario/file-backups/blob/d66599f3372de6163db847bf7da9cddcf3c3724d/content_scripts/contentScript.js#L180>.
>  
> BJ has a similar function.
>
> *This DOM element should not be saved to the file*. ... It seems if 
> "recreateOriginal" is called, it is saved and breaks the file, so it can 
> only be fixed with a text editor, removing the element. 
>
> The problem I had to fix, was a difference between unix file paths and 
> windows file paths. see line 51 and 54 
> <https://github.com/pmario/file-backups/blob/d66599f3372de6163db847bf7da9cddcf3c3724d/assets/classic/inject.js#L51-L54>.
>  
> The "old" code was windows compatible, but caused a problem for unix 
> systems with the security.fileuri .... setting activated. ... So there 
> may be a similar fix for timimi. 
>
>
> current Timimi implementation has a similar issue 
>> <https://github.com/ibnishak/Timimi/issues/27>, which I haven't 
>> reproduced yet but I'll check my guess too.
>>
>
> I'll have a closer look, maybe I can help there. The "old" code was 
> windows compatible, but caused a problem for unix systems with the 
> security.fileuri .... setting activated. ... So there may be a similar 
> fix for timimi. 
>
>
> have fun!
> mario
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/2fc05a37-e1ea-403c-b34a-d6e09652779a%40googlegroups.com.

Reply via email to