Giter VIP home page Giter VIP logo

Comments (38)

serverfire avatar serverfire commented on August 23, 2024

@libreliodev How can user login? Is it only for userservice?

from javascript.

libreliodev avatar libreliodev commented on August 23, 2024

@serverfire

How can user login? Is it only for userservice?

Sorry, I don't understand your questions. Can you please be more precise?

Also, please note that #44 is the most urgent issue.

from javascript.

serverfire avatar serverfire commented on August 23, 2024

@libreliodev
You've said.

If the user did not log in previously, a modal dialog should be shown:

How can we know user is logged in? You didn't mentioned anything about it.

from javascript.

libreliodev avatar libreliodev commented on August 23, 2024

@serverfire

You've said.

If the user did not log in previously, a modal dialog should be shown:

How can we know user is logged in? You didn't mentioned anything about it.

The user will log in using this modal dialog. You should remember the credentials in local storage.

from javascript.

serverfire avatar serverfire commented on August 23, 2024

@libreliodev I don't have enough resources to test this issue.
I need to have access on a test user and code.
It would be nice to set correct CORS info for those two link in order to have access to them via ajax.

from javascript.

libreliodev avatar libreliodev commented on August 23, 2024

@serverfire

It would be nice to set correct CORS info for those two link in order to have access to them via ajax.

This will be done tomorrow (https://github.com/libreliodev/php/issues/20)

I need to have access on a test user and code.

You'll get codes to test via private message tomorrow.

from javascript.

libreliodev avatar libreliodev commented on August 23, 2024

@serverfire

I need to have access on a test user and code.

You'll get codes to test via private message tomorrow.

Sorry, this will not be ready today. Hopefully tomorrow morning.

from javascript.

libreliodev avatar libreliodev commented on August 23, 2024

@serverfire Codes have been sent to you by private message

from javascript.

serverfire avatar serverfire commented on August 23, 2024

@libreliodev I did another test on user service. But i get this error. 461 UnauthorizedUser
Can you check why i get this error?

from javascript.

libreliodev avatar libreliodev commented on August 23, 2024

@serverfire Can you provide the complete URL sent to the server?

from javascript.

libreliodev avatar libreliodev commented on August 23, 2024

@serverfire Please pay attention to this

&deviceid=[unique id of user device]

This is important because a given user can only use a limited number of devices to view a given issue. This is intended to avoid an unlimited number of people using the same userID/password. See http://stackoverflow.com/questions/18738161/unique-device-identification for an explanation of what we are trying to achieve. Using fingerprintJS might be a good idea.

from javascript.

serverfire avatar serverfire commented on August 23, 2024

@libreliodev There is no standard method to get device id via browser. And fingerprint.js is not suitable to use in here. Also this method can be easily cracked by using first device id for all requests.
We can discuss this in more details.

from javascript.

libreliodev avatar libreliodev commented on August 23, 2024

@serverfire Thank you for your comments.

There is no standard method to get device id via browser. And fingerprint.js is not suitable to use in here

Why is fingerprint.js not suitable? Are there technical incompatibilities?

Also this method can be easily cracked by using first device id for all requests.

The issue is not to avoid hackers cracking this protection. The issue is to prevent someone sharing his subscription credentials with friends and families, or on the internet. Any other suggestion?

from javascript.

serverfire avatar serverfire commented on August 23, 2024

@libreliodev fingerprint.js may(94% success) find a unqiue id for particular browser. This means user cannot access the file in another browser.
If some changes happens to browser unique id will change.
I don't think it's a good idea to pass it as device id.

from javascript.

serverfire avatar serverfire commented on August 23, 2024

@libreliodev We can place other restrictions.

  1. Limit by region.
  2. Limit by ip address(one or multiple ip address).
  3. Limit by requests per day.
  4. ...

from javascript.

libreliodev avatar libreliodev commented on August 23, 2024

@serverfire

94% success

What this means according to my understanding is that in rare cases, 2 different browsers can have the same fingerprint. Not a big issue for us.

This means user cannot access the file in another browser.

Yes, as mentionned, we allow "a certain number" of different device ids.

If some changes happens to browser unique id will change.

Not a problem, because we allow "a certain number" of different device ids.

Limit by region, Limit by ip address, Limit by requests per day

Not options. We need to allow a given user to read as much as he wants on a given "device".

from javascript.

serverfire avatar serverfire commented on August 23, 2024

@libreliodev Alright. No problem.
About request to subscribers.php, ajax is not able to handle redirect response 302.
We've to add a way to get json response from this page with redirect url.
Can we do that?

from javascript.

serverfire avatar serverfire commented on August 23, 2024

@libreliodev I see its response is in xml. That's ok. Can we have a special query to send 200(OK) response always?

from javascript.

libreliodev avatar libreliodev commented on August 23, 2024

@serverfire

About request to subscribers.php, ajax is not able to handle redirect response 302.
We've to add a way to get json response from this page with redirect url.
Can we do that?

Yes, we can add a response in the body. It would probably be better to use XML for consistency reasons. Is something like this OK?

   <?xml version="1.0" encoding="UTF-8"?>
        <Redirect>
            <UrlString>[Redirect URL]</UrlString>
        </Redirect>

from javascript.

serverfire avatar serverfire commented on August 23, 2024

@libreliodev Alright.

from javascript.

libreliodev avatar libreliodev commented on August 23, 2024

@serverfire

Can we have a special query to send 200(OK) response always?

Is it a problem if you get a 302 header, with the XML body?

from javascript.

serverfire avatar serverfire commented on August 23, 2024

Yes 302 is the problem.

from javascript.

libreliodev avatar libreliodev commented on August 23, 2024

Yes 302 is the problem.

You mean, you can read only responses with 200 header? So, the same applies for error messages?

from javascript.

serverfire avatar serverfire commented on August 23, 2024

Yes. And i didn't saw redirect tag in 302 response.

from javascript.

libreliodev avatar libreliodev commented on August 23, 2024

And i didn't saw redirect tag in 302 response.

It's not yet implemented!!!

Please add the header=200 arg to all requests. This should be implemented later today or tomorrow, you'll be informed via Github.

from javascript.

libreliodev avatar libreliodev commented on August 23, 2024

Redirect and error tags without headers are now implemented (https://github.com/libreliodev/php/issues/22)

from javascript.

serverfire avatar serverfire commented on August 23, 2024

@libreliodev It's not implemented correctly. I get parse errors.
UrlString content's should be encoded. You can encode urlstring data using htmlspecialchars function in php.

from javascript.

libreliodev avatar libreliodev commented on August 23, 2024

@serverfire Done, sorry for the mistake

from javascript.

serverfire avatar serverfire commented on August 23, 2024

@libreliodev Done!

from javascript.

libreliodev avatar libreliodev commented on August 23, 2024

@serverfire Just tested using Safari on Mac. Nothing happens after entering user name and password.

from javascript.

serverfire avatar serverfire commented on August 23, 2024

@libreliodev Fixed!

from javascript.

libreliodev avatar libreliodev commented on August 23, 2024

@serverfire Just tested again, on localhost, and http://librelio-com.s3-website-eu-west-1.amazonaws.com, under Safari and Firefox. Nothing happens after clicking on submit. Is bower installneeded?

from javascript.

serverfire avatar serverfire commented on August 23, 2024

@libreliodev Yes bower install is required. (for fingerprint). Sorry i forgot to tell you.

from javascript.

libreliodev avatar libreliodev commented on August 23, 2024

@serverfire Tested again.

Please do not offer the possibility to download the pdf file (which should never occur), proceed directly to reader.

screen shot 2014-06-19 at 15 03 44

from javascript.

serverfire avatar serverfire commented on August 23, 2024

@libreliodev It's not possible to open pdfreader(on new page) without this extra step. Only thing we can do is to open reader in current page.(meaning no target="_blank")
Or user should click on View PDF File. (remove Download File link)

from javascript.

libreliodev avatar libreliodev commented on August 23, 2024

It's fine to open in current page.

On 19 Jun 2014, at 15:47, serverfire [email protected] wrote:

@libreliodev It's not possible to open pdfreader without this extra step. Only thing we can do is to open reader in current page.(meaning no target="_blank")
Or user should click on View PDF File. (remove Download File link)


Reply to this email directly or view it on GitHub.

from javascript.

serverfire avatar serverfire commented on August 23, 2024

@libreliodev Fixed!

from javascript.

libreliodev avatar libreliodev commented on August 23, 2024

Successfully tested, despite minor bugs/ommissions detected, reported separately.

from javascript.

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.