-
Notifications
You must be signed in to change notification settings - Fork 1
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
Implemented login page. #2
base: master
Are you sure you want to change the base?
Conversation
login.js when used as a module works as a mithril component that renders a login page and communicates with RS Json API to faciliate validation. Also updated qmake file to include login.js in build.
Added extra function to verify API keys(to be used by login.js) and updated HTTP requests function to use a different callback on failiure.
index.html's initial startpoint now loads all pages using mithril's route functionality. And changed downloads.js to disable updating of downloads list before the keys have been verified.
Communication with Json API now only happens if the keys are verified. Automatic rendering and reloading of downloads is handled by oninit attribute of the downloads component.
so from my tests the login system you implemented seems to work, but probably involuntarily the download page is now broken and the download file list is never requested, about mithril update, I think we should not include it minified in our repository, it is impossible to review WTF has been really included, and if we need minified it should be done at compile time, not included in our repository, as it would pose serious security concerns about the webui... |
So I have been looking at the differences between mithril.js minified and not minified, for such a minimalist framework I think using the minified source is not worth the effort/risk, so we should remove the minified version completely, and make sure the RS webui keeps working |
Yes, the minified version is present, but it was not being used in the build process. I will look into the downloads page. But I think debugging is still difficult, because what qmake essentially does is, take all the .js scripts and append them to a single file. Makes it hard to figure out from which script the error occurs. |
Due to security and debugging issues, the minified version will not be used in the build process anymore. The framework is pretty minimalistic so it would not make that big of a difference.
Previously, the downloads page would be loaded but API would not be accessed. This was causing issues with mithril's auto rendering. Not loading the downloads component will make sure no requests are being sent before login finishes.
Removed minified script. |
Created a login page in mithril.js as part of the task 101 of the project.