Giter VIP home page Giter VIP logo

Comments (8)

robinmoisson avatar robinmoisson commented on May 17, 2024

Hi, thanks for the report, I'm trying to get what you're doing exactly. From what I understand, you cloned the repository on your local machine and opened the index.html file directly with your browser and it can't load the local template file.

Do I understand the problem correctly?

What is the extension you used to bypass this and is not working anymore, https://chrome.google.com/webstore/detail/locallinks/jllpkdkcdjndhggodimiphkghogcpida ?

from staticrypt.

hgarita89 avatar hgarita89 commented on May 17, 2024

from staticrypt.

robinmoisson avatar robinmoisson commented on May 17, 2024

So:

  • you encrypt your file on StatiCrypt and you download the protected file (say, index_encrypted.html)
  • you open that file in your browser and it opens fine
  • you type in the password
  • you see your original index.html file but the files required by the page do not work?

One hypothesis: in your index.html file, are the links to the files in this format: src="//192.168.10.2/Catastro/DATOS/..." ? Using // at the beginning of the url instead of http:// means the browser will try to use the current protocol to request the file.

So if you are opening index.html with a link like https://.../index.html the file will be requested over https://192.168.10.2... instead of http. Since you open index_encrypted.html as a local file (file://.../index_encrypted.html) the protocol is file:// and your link becomes file://192.168.10.2.

-> FIX: use links that include the protocol to use in your original index.html, so src="http://192.168.10.2.... Or open the index_encrypted.html file with a http:// link instead of as a local file.

Is it clear? Can that explain your situation?

from staticrypt.

oleteacher avatar oleteacher commented on May 17, 2024

This post on Stack Over Flow may help those wishing to use Chrome and local links:

https://stackoverflow.com/questions/39007243/cannot-open-local-file-chrome-not-allowed-to-load-local-resource/46480984#46480984

We use the Web Server extension in classroom projects all the time and works great. Very basic but is great for simple development projects. If it helps, vote for the question on Stack Over Flow - my husband would appreciate it;)

from staticrypt.

wisgit avatar wisgit commented on May 17, 2024

@robinmoisson :
I have the same problem as hgarita89.
You asked him whether he tried https://chrome.google.com/webstore/detail/locallinks/jllpkdkcdjndhggodimiphkghogcpida, but didn't comment further.

Well, I tried that ressource, but receive error 404.

Is there any way to get local links working again?
I'm using Chrome, Version 68.0.3440.75 (Offizieller Build) (64-Bit)

Update:
I meanwhile found the correct link to the (replacement-) extension, it is https://chrome.google.com/webstore/detail/enable-local-file-links/nikfmfgobenbhmocjaaboihbeocackld

from staticrypt.

ErikB1294 avatar ErikB1294 commented on May 17, 2024

I've also tried the link but got error 404 instead. Maybe they removed it?
Alternatively I found a similar Chrome extension and it works quite well for me: https://chrome.google.com/webstore/detail/local-explorer-file-manag/eokekhgpaakbkfkmjjcbffibkencdfkl.
It seems to be able to bypass Chrome restriction. I've only tested in my case though so I'm curious if anyone else tested this one.

from staticrypt.

robinmoisson avatar robinmoisson commented on May 17, 2024

Trying to understand if this is still an issue and what happens here - is the error thrown

  1. when you clone this repo and open the index.html to encrypt, using it as a sort of GUI. If so, can you help me understand why you don't use the online version https://robinmoisson.github.io/staticrypt/ - more control over the code?
  2. when you decrypt your custom html and your page loads you get this error. Can you give an example of a problem file? Does the file work when you locally open the unencrypted version directly?

from staticrypt.

robinmoisson avatar robinmoisson commented on May 17, 2024

Re-reading the issue - it looks like the original problem was encrypting a file that points toward external resources without a fully qualified domain name + protocol (eg <script src="https://example.com/my_js.js">). If you open a local html file, chrome won't load relative link from that page (eg <script src="./my_js.js">).

This is not because of StatiCrypt but because of your original file. To test you can open your file locally before running staticrypt on it: if the file load well it should be fine after staticrypt decryption, otherwise you'll have to fix it.

I'm closing the issue, please feel free to comment or re-open if you find this problem in a way that's directly related to staticrypt.

from staticrypt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.