Skip to content
  1. Feb 03, 2016
  2. Feb 02, 2016
  3. Jan 25, 2016
  4. Jan 23, 2016
  5. Jan 21, 2016
  6. Jan 20, 2016
  7. Jan 19, 2016
  8. Jan 18, 2016
  9. Jan 17, 2016
  10. Jan 15, 2016
  11. Jan 11, 2016
  12. Dec 20, 2015
  13. Dec 18, 2015
  14. Dec 16, 2015
    • Daniel Dickinson's avatar
      validation: Add option ipv4only option to host and hostport datatypes · c481f3f3
      Daniel Dickinson authored
      Some applications only support ipv4 so add ipv4only option
      to host and hostport datatypes so that for thos applications
      that when an IP address is specified only and ipv4 ip address
      gets accepted.
      c481f3f3
    • Daniel Dickinson's avatar
      modules/luci-base: Fix ipaddrport validator to support ipv6 · bbcfad79
      Daniel Dickinson authored
      The previous versiono of ipaddrport validator only worked for ipv4
      due to disallowing colons (:) in ip address which obvious fails for
      ipv6.  We now instead allow either ipv4 address or an ipv6 address of
      the form [<ipv6address>]:port
      bbcfad79
    • Daniel Dickinson's avatar
      luci-base: Make default for FileUpload 'safe' · b475ec69
      Daniel Dickinson authored
      Some files and pointers to files are not safe to remove without a replacement
      file and config pointing to the file.  For instance for uhttpd application in
      the works, removing the certificate or key config or files without having the
      replacements in places renders the WeUI inaccessible.
      
      The only other place where FileUpload is currently used is for wifi certificates
      for which the 'safe' handling is also preferred.  Therefore make the default for
      the FileUpload widget the safe handling and add a property self.unsafeupload that
      allows for the old unsafe handling should it prove useful in some case.
      
      Also allow to specify a file already on router instead of uploading a file.
      
      Signed-off By: Daniel Dickinson <openwrt@daniel.thecshore.com>
      b475ec69
  15. Dec 15, 2015
    • Daniel Dickinson's avatar
      lib-nixio / luci-base: Fix for reading csrf token prevents file upload · b130ca55
      Daniel Dickinson authored
      
      
      The call to http.formvalue in order to read the csrf token causes
      _parse_input to be triggered *before* controllers and cbi maps have
      been built.  This results in the failure of file uploads because
      the file handler is not yet in place when _parse_input gets called,
      and it is in _parse_input that POST data is parsed (including files).
      
      To fix this we add the ability to write file fields to temporary
      files (using mkstemp and unlink in nixio.file) and use this to
      store file data until the filehandler is registered, with a
      fallback to reading the file data into memory.
      
      Once the filehandler callback gets registered we iterate
      though all previously parsed (saved) files and copy the
      data to the file handler, and then close the temporary
      file (which finally removes because we unlinked after
      creating the file, but didn't close the file so unlink
      was deferred).
      
      Signed-off-by: default avatarDaniel Dickinson <openwrt@daniel.thecshore.com>
      b130ca55
    • Daniel Dickinson's avatar
      validation: Add option ipv4only option to host and hostport datatypes · 0ec3f91a
      Daniel Dickinson authored
      Some applications only support ipv4 so add ipv4only option
      to host and hostport datatypes so that for thos applications
      that when an IP address is specified only and ipv4 ip address
      gets accepted.
      0ec3f91a