-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
luci-app-p910nd: convert to JS #6907
Conversation
applications/luci-app-p910nd/htdocs/luci-static/resources/view/p910nd.js
Outdated
Show resolved
Hide resolved
applications/luci-app-p910nd/htdocs/luci-static/resources/view/p910nd.js
Outdated
Show resolved
Hide resolved
applications/luci-app-p910nd/htdocs/luci-static/resources/view/p910nd.js
Show resolved
Hide resolved
applications/luci-app-p910nd/htdocs/luci-static/resources/view/p910nd.js
Outdated
Show resolved
Hide resolved
applications/luci-app-p910nd/htdocs/luci-static/resources/view/p910nd.js
Outdated
Show resolved
Hide resolved
3028388
to
3a60c6c
Compare
applications/luci-app-p910nd/htdocs/luci-static/resources/view/p910nd.js
Outdated
Show resolved
Hide resolved
applications/luci-app-p910nd/root/usr/share/rpcd/acl.d/luci-app-p910nd.json
Outdated
Show resolved
Hide resolved
"uci": [ "p910nd" ] | ||
"uci": [ "p910nd" ], | ||
"file": { | ||
"/usr/bin/find -L /dev -maxdepth 3 -type c*": ["exec"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change the command pattern to exactly:
/usr/bin/find -L /dev -maxdepth 3 -type c -name lp[0-9]
This will prevent unwanted parameter injection.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changing it to exactly /usr/bin/find -L /dev -maxdepth 3 -type c -name lp[0-9]
causes 403 when issuing the command via cgi-bin, and Error executing "find" command: Access to command denied by ACL
.
Changing it to exactly /usr/bin/find -L /dev -maxdepth 3 -type c -name lp\[0-9\]
causes 403 and the page does not even load (prevented by 403).
I tried many permutations and could not find a specific one that worked. ( All variants work find at the command line, however. )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As an alternative we may add a script to find drivers and call it. rpcd may also work but I'm not sure if it needed if no one else will ever call it.
6113aad
to
dd24f51
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add yourself as a maintainer
applications/luci-app-p910nd/root/usr/share/rpcd/acl.d/luci-app-p910nd.json
Outdated
Show resolved
Hide resolved
4cb6655
to
a733732
Compare
d9d94b3
to
35352f2
Compare
applications/luci-app-p910nd/htdocs/luci-static/resources/view/p910nd.js
Outdated
Show resolved
Hide resolved
35352f2
to
07a2ac4
Compare
Simple p910nd printer management, and some level of automation that detects whether the typically necessary kmods are installed, and if not provides quick links to install those. Tested on: 22.03.6, 23.05.2 Signed-off-by: Paul Donald <newtwen@gmail.com>
07a2ac4
to
7053272
Compare
Hi @systemcrash While this did the conversion from lua to JS, it didn't drop the now superfluous(?) dependency on Disclaimer: I only (successfully) went through the luci menus for p910nd and couldn't actually test it with a printer, yet (I still need luci-compat on my production routers for ddns).
|
Well spotted. Fix is in. I have you covered with the ddns thing. I've just finished converting it to ucode, update is in master/24/23. |
Wow, that's great - seems to work, no lua anymore (after giving the luci-app-ddns Makefile the same dependency treatment) :)
|
Simple p910nd printer management, and some level of automation that detects whether the typically necessary kmods are installed, and if not provides quick links to install those.
This effectively replaces the old LUA version.
Feedback welcome - there may be some slightly better ways of doing things like opkg processes and the
NamedSection
.Tested on: 21.02.1, 22.03.6, 23.05.2
Signed-off-by: <my@email.address>
row (viagit commit --signoff
)<package name>: title
first line subject for packages