Skip to content
  1. May 23, 2018
  2. May 20, 2018
  3. May 19, 2018
  4. May 18, 2018
  5. May 15, 2018
  6. May 13, 2018
  7. May 07, 2018
  8. May 05, 2018
    • Jo-Philipp Wich's avatar
      luci-base: add transitional /etc/init.d/ucitrack · 9f796fad
      Jo-Philipp Wich authored
      
      
      Ship an /etc/init.d/ucitrack for spawning a virtual service with the sole
      purpose to track the configurations and dependencies formerly handled by
      luci-reload.
      
      Once all LuCI supported services ship with procd compatible init scripts,
      the uci track support can be dropped.
      
      Signed-off-by: default avatarJo-Philipp Wich <jo@mein.io>
      9f796fad
    • Jo-Philipp Wich's avatar
      luci-mod-admin-full: rework wifi configuration · fd1ddcc4
      Jo-Philipp Wich authored
      
      
      - localize variables
      - get rid of redirects breaking apply workflow
      - auto-adjust unusable channels when switching country
      - use apply/rollback workflow when enabling/disabling networks
      
      Signed-off-by: default avatarJo-Philipp Wich <jo@mein.io>
      fd1ddcc4
    • Jo-Philipp Wich's avatar
      treewide: rework uci apply workflow · 8deb9495
      Jo-Philipp Wich authored
      
      
      Switch to rpcd based uci apply/rollback workflow which helps to avoid soft-
      bricking devices by requiring an explicit confirmation call after config
      apply.
      
      When a user now clicks "Save & Apply", LuCI first issues a call to uci apply
      which commits and reloads configuration, then goes into a polling countdown
      mode where it repeatedly attempts to call uci confirm.
      
      If the committed configuration is sane, the confirm call will go through and
      cancel rpcd's pending rollback timer.
      
      If the configuration change leads to a loss of connectivity (e.g. due to bad
      firewall rules or similar), the rollback mechanism will kick in after the
      timeout and revert configuration files and pending changes to the pre-apply
      state.
      
      In order to cover such rare cases where a lost of connectivity is expected
      and desired, the user is offered an "unchecked" apply option after timing
      out, which allows committing and applying the changes anyway, without the
      extra safety checks.
      
      As a consequence of this change, the luci-reload mechanism is now completely
      unsused since rpcd uses ubus config reload signals to reload affected
      services, which means that only procd-enabled services will receive proper
      reload treatment with the new workflow.
      
      Signed-off-by: default avatarJo-Philipp Wich <jo@mein.io>
      8deb9495
    • Jo-Philipp Wich's avatar
      luci-base: enable uci session isolation · 7cca3139
      Jo-Philipp Wich authored
      
      
      Switch to per-session save directories to decouple LuCI configuration changes
      from system wide ones.
      
      Signed-off-by: default avatarJo-Philipp Wich <jo@mein.io>
      7cca3139
    • Jo-Philipp Wich's avatar
      luci-mod-rpc: more auth/login fixes, expose further libraries · 055b621c
      Jo-Philipp Wich authored
      
      
      The previous attempt to fix authentication broke login functionality so
      rework the code once again, this time with referencing helper functions
      directly via the controller scope.
      
      Furthermore, properly expose luci.sys.wifi.getiwinfo() and luci.ip.
      
      For getiwinfo(), the RPC wrapped function accepts one further optional
      parameter specifying the operation to invoke on the iwinfo instance.
      If no operation is specified, a summary object containing all info
      without country and scan list is returned.
      
      Example to obtain iwinfo summary object:
        curl --cookie sysauth=... \
             --data '{"method": "wifi.getiwinfo", "params": ["wlan0"]}' \
      		"http://192.168.1.1/cgi-bin/luci/rpc/sys"
      
      Example to obtain iwinfo scan list:
        curl --cookie sysauth=... \
             --data '{"method": "wifi.getiwinfo", "params": ["wlan0", "scanlist"]}' \
      		"http://192.168.1.1/cgi-bin/luci/rpc/sys"
      
      The exposed luci.ip class uses a similar approach to allow invoking
      instance methods on cidr objects. The new(), IPv4(), IPv6() and MAC()
      constructors accept two further optional arguments, with the first
      specifying the instance method to invoke and the second the value to
      pass to the instance method.
      
      Example to get list of IPv4 neighbours (ARP entries):
        curl --cookie sysauth=... \
             --data '{"method": "neighbors", "params": [{"family": 4}]}' \
      		"http://192.168.1.1/cgi-bin/luci/rpc/ip"
      
      Example to add 100 hosts to a network address:
        curl --cookie sysauth=... \
             --data '{"method": "IPv4", "params": ["192.168.0.1", "255.255.255.0", "add", 1000]}' \
      		"http://192.168.1.1/cgi-bin/luci/rpc/ip"
      
      Signed-off-by: default avatarJo-Philipp Wich <jo@mein.io>
      055b621c
    • Jo-Philipp Wich's avatar
      luci-base: xhr.js: fix timeout setting with IE 11 · 34821b15
      Jo-Philipp Wich authored
      Internet Explorer 11 requires the timeout to be applied after the open()
      call, otherwise an invlaid state exception will be raised
      
      Fixes aa6c9715
      
       ("luci-base: extend xhr.js")
      Signed-off-by: default avatarJo-Philipp Wich <jo@mein.io>
      34821b15
    • Hannu Nyman's avatar
      luci-base: show wifi chip identification on overview · 4edc9256
      Hannu Nyman authored
      
      
      Show the correct wifi chip identification in case iwinfo
      recognises the chip.
      
      So far the wifidev.get_i18n function has practically always
      returned just "Generic", but use iwinfo.hardware_name to
      fetch the name.
      
      In case iwinfo returns the default "Generic MAC80211", there
      is a double 80211 in the final string, which is a cosmetic bug.
      
      Signed-off-by: default avatarHannu Nyman <hannu.nyman@iki.fi>
      4edc9256
    • Jo-Philipp Wich's avatar
      luci-mod-rpc: fix authentication via query string parameter · 6a1cdca3
      Jo-Philipp Wich authored
      Localize the `authenticatior()` and `session_retrieve()` functions into the
      `index()` function scope so that they're retained when extracting the
      function into the dispatcher bytecode cache.
      
      Also allow access to the global scope since upvalues do not work reliably
      due to the out-of-context byte code caching of index functions.
      
      Fixes https://github.com/openwrt/luci/issues/1300#issuecomment-381352765
      Fixes feefc600
      
       ("luci-mod-rpc: rework authentication and session handling")
      Signed-off-by: default avatarJo-Philipp Wich <jo@mein.io>
      6a1cdca3
  9. May 03, 2018
  10. May 02, 2018
  11. Apr 26, 2018
  12. Apr 25, 2018
  13. Apr 24, 2018
  14. Apr 22, 2018