PKG_LICENSE:=AGPL-3.0-or-later
PKG_MAINTAINER:=Stan Grishin <stangri@melmac.ca>
PKG_VERSION:=1.2.2
-PKG_RELEASE:=16
+PKG_RELEASE:=18
LUCI_TITLE:=AdBlock-Fast Web UI
LUCI_URL:=https://github.com/mossdef-org/luci-app-adblock-fast/
getServiceInfo: getServiceInfo,
getQueryLogStatus: getQueryLogStatus,
setQueryLog: setQueryLog,
+ setRpcdToken: RPC.setRpcdToken,
callLogRead: callLogRead,
});
"rpcd_token",
_("Remote Access Token"),
_(
- "Token for <a href=\"" + pkg.URL + "#chrome-extension\" target=\"_blank\">Google Chrome extension</a> or other remote API access. " +
+ "Token for %sGoogle Chrome extension%s or other remote API access. " +
"Copy this value into the extension settings as the password. " +
"Changing it here will update the API user password on save.",
- ),
+ ).format('<a href="' + pkg.URL + '#chrome-extension" target="_blank">', "</a>"),
);
o.default = "";
o.rmempty = true;
o.write = function (section_id, formvalue) {
var currentValue = L.uci.get(pkg.Name, section_id, "rpcd_token");
if (formvalue && formvalue !== currentValue) {
- RPC.setRpcdToken(pkg.Name, formvalue);
+ adb.setRpcdToken(pkg.Name, formvalue);
}
return L.uci.set(pkg.Name, section_id, "rpcd_token", formvalue);
};
msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:817
-msgid "Token for <a href=\""
+msgid ""
+"Token for %sGoogle Chrome extension%s or other remote API access. Copy this "
+"value into the extension settings as the password. Changing it here will "
+"update the API user password on save."
msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:590
# Generate random rpcd_token if not already set
_token="$(uci -q get adblock-fast.config.rpcd_token)"
if [ -z "$_token" ]; then
- _token="$(head -c 24 /dev/urandom | base64 | tr -d '/+=' | head -c 24)"
+ _token="$(tr -dc 'A-Za-z0-9' < /dev/urandom | head -c 24)"
uci set adblock-fast.config.rpcd_token="$_token"
uci commit adblock-fast
fi