Skip to content
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

Add reading epub and pdf in browser #12

Merged
merged 5 commits into from
May 16, 2015
Merged

Add reading epub and pdf in browser #12

merged 5 commits into from
May 16, 2015

Conversation

demorfi
Copy link
Contributor

@demorfi demorfi commented Mar 11, 2015

Added reading epub and pdf in browser

@demorfi demorfi changed the title Add Add reading epub and pdf in browser Mar 11, 2015
@openam
Copy link
Owner

openam commented May 13, 2015

Sorry this has been so long. I'm really loving this idea. I've just been swamped.

It doesn't seem to be letting me use the authentication part. I'm trying admin:password for the username:password. I assume that's what's committed to the database.db. Is that correct?

The language settings don't seem to be working for me either.

@openam
Copy link
Owner

openam commented May 14, 2015

It looks like you used the AuthComponent to generate the password hash. That mean we should probably commit the associated Security.salt and the Security.cipherSeed.

@demorfi
Copy link
Contributor Author

demorfi commented May 16, 2015

Username, password, and other settings are stored in the database.db. For the best security is to change the password salt. Settings on the left core.php.default default. Available only two languages ​​- English and Russian. Session keeps the selected language.

@openam
Copy link
Owner

openam commented May 16, 2015

If that's the case then there really is no default username or password. The only way to change them if you change the Security.salt is by changing $this->Auth->allow('logout'); to $this->Auth->allow(); in the UsersController.php file. I think that I'm going to commit the changed core.php and set default username an passwords.

As for the languages it looks like if I clear my cookies after changing the language I get Russian on the login page, then it changes to english after I login, even though ru is still selected in the settings.

@openam openam merged commit d1213c1 into openam:master May 16, 2015
@demorfi
Copy link
Contributor Author

demorfi commented May 17, 2015

By default database.db -> table users, 3 user (admin:admin, user:user, children:children). You are using the master branch?

@openam
Copy link
Owner

openam commented May 17, 2015

I thought set the default passwords to password after seeing commit 284842a. I ended up committing the core.php file and committing the passwords with commit 69021dd. I updated documentation in commit 978db18.

Yes, I'm using the master branch.

@demorfi
Copy link
Contributor Author

demorfi commented May 24, 2015

Thank you. I've updated my branch.

@danpolanco
Copy link

I believe I'm seeing a related issue. If I change the salt, I can't login using the default users. And if I can't change the salt, then having a salt becomes pointless, yeah?

The other oddity is that it always pops up and asks for basic auth like so:
screen shot 2016-01-07 at 1 08 23 pm

I have it running behind a reverse proxy, so perhaps that is why?

Nice work otherwise.

@openam
Copy link
Owner

openam commented Jan 7, 2016

@DanTheColoradan see #12 (comment) that will allow you to change the salt and go to the routes to change the passwords without being authenticated.

@danpolanco
Copy link

[...] The only way to change them if you change the Security.salt is by changing $this->Auth->allow('logout'); to $this->Auth->allow(); in the UsersController.php file. [...]

So I should change it to $this->Auth->allow();. Do I need to change it back after setting the passwords?

@openam
Copy link
Owner

openam commented Jan 7, 2016

Yes, you'd want to change it back afterwards, otherwise it's allowed by anyone with or without being logged in.

$this->Auth->allow(); allows anyone logged in or not to access all the routes. See, http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html#making-actions-public

@danpolanco
Copy link

Awesome. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants