mirror of
https://github.com/gtsteffaniak/filebrowser.git
synced 2026-11-26 16:39:41 -05:00
Anti CSRF layer
This commit is contained in:
1 parent
aa79b076ae
commit
37c77a3cee
8 files changed
+86
-9
No files matched your search
+8
-8
@@ -77,7 +77,7 @@ func (fi bindataFileInfo) Sys() interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
var _publicCssStylesCss = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xc4\x5b\x7b\x73\xdb\xb6\x96\xff\x3f\x33\xf9\x0e\xdc\x78\x3a\x79\x54\x64\x29\xd9\x92\x63\x79\xda\xa9\x93\xb8\xbb\x9e\x4d\xd2\x9d\x24\x33\x3b\xbd\x99\xfc\x01\x91\xa0\x84\x9a\x24\x38\x24\x65\xcb\xe9\xe4\xbb\xdf\x03\x10\x00\xf1\x22\x25\xfb\xa6\xf7\x5a\x6d\x4c\x13\xaf\x83\xf3\xfc\xe1\xe0\xe8\xa7\x17\xc1\xfb\xdf\x3f\xbc\xbb\x78\x7b\xf5\x8f\xcb\xe0\xf5\xc7\x8f\xc1\x8b\x9f\x1e\x3f\x7a\xfc\x68\xd3\x16\x79\xf0\xd7\xe3\x47\x01\xfc\x64\xb4\x6c\xc3\x0c\x15\x24\xbf\x5b\x06\x0d\x2a\x9b\xb0\xc1\x35\xc9\xce\xbb\xd6\xb0\x68\xc2\x16\xef\xda\xb0\x21\x5f\x71\x88\xd2\x3f\xb7\x4d\xbb\x0c\xa6\x71\xfc\x83\xec\x70\x8b\x57\xd7\xa4\x1d\xe8\xf4\xf8\xd1\x37\xb6\xde\x8a\xa6\x77\x72\xbd\x02\xd5\x6b\x52\x2e\x83\x58\xb4\xa1\xba\x25\x49\x8e\x27\xf0\xd4\x90\x94\xfd\x4e\x71\x8b\x48\xde\xc0\x53\x46\xd6\x09\xaa\x5a\x42\xcb\xee\x8f\x6d\xcd\xda\x33\x4a\x5b\x5c\xc3\xc3\x06\xa3\x94\x3f\x14\x88\xb0\x1e\x05\x2e\xb7\xf0\xab\x44\x37\xf0\x6f\x83\x13\x31\xb0\xd9\x16\xb0\xa8\x22\x20\x25\x4d\x95\x23\xd8\xec\x2a\xa7\xc9\xb5\xa4\x62\x9b\x12\x0a\x7d\x13\x54\xde\x20\xb6\x74\x55\xd3\x75\x8d\x1b\xf6\x78\x03\x64\x51\x67\x34\x29\x73\x52\xe2\xd0\x99\x64\x59\xd2\xf6\xd9\xe7\x04\xb8\x5a\xd3\xbc\xf9\xf2\xdc\x19\x58\xd2\x12\x0b\xe6\x6d\x30\x59\x6f\xda\x9e\x17\x72\x51\x39\xe6\x06\x33\xe6\xa0\x3c\x44\x39\x59\x03\xcf\x56\xa8\xc1\x6c\x55\xd1\xbd\xc5\x05\x4c\xd9\x32\x9e\x7c\xde\x90\x34\xc5\xe5\x17\xef\x6a\x92\x3c\xd9\xb8\x42\xc9\xf5\xba\xa6\xdb\x32\x0d\x13\x9a\xd3\x7a\x19\xb4\x35\x08\xbe\x42\x35\x2e\x5b\x9f\x5c\x53\x9c\xd0\x1a\x31\x76\x86\xcd\x35\xa9\x96\x01\x5d\xfd\x09\xec\x6d\xe4\xc4\x4b\x04\xbc\xbe\xe1\x32\x5c\x6e\x28\x50\x2d\x57\xa2\xdb\x96\x73\xe9\x96\xa4\xed\x46\x93\xf9\x6a\x55\x7f\x6e\x49\x9b\x63\x45\xf0\x8a\xd6\x20\xcb\x70\x45\xdb\x96\x16\x06\x93\x2c\x0a\x96\x01\xd0\x8d\x6b\x36\xed\xde\x0e\x41\x0a\xd3\xe1\x54\x6a\x21\xd3\x05\x90\x4a\xb9\x36\x74\xff\x56\x08\x81\x94\x1b\x50\xfc\xf6\xb0\xce\x2b\x9a\xc3\x1a\xa2\x6f\x9a\x95\x46\xa7\xa6\xbd\xcb\x31\x4c\xd8\x82\xd8\x12\xd1\x67\x33\x35\xbb\x80\xa5\x2c\x83\x19\x2e\xce\x2d\xab\x88\x16\xa7\xb8\x50\x8c\x82\xd7\xd7\xc3\x52\x3b\xca\xb2\x58\x8c\x97\x6f\xe2\x58\x0e\x6d\x0a\x94\xe7\x9e\x35\x5f\x2a\xab\x6c\xb6\x7c\x93\xdb\xca\xd3\xeb\x74\x2e\x0d\x9c\xcb\x4f\x29\xaa\x78\x59\xd1\x86\x74\xbc\xae\x31\x68\x20\xc8\xfe\xfc\x20\x8d\x85\x25\x7b\x81\x77\x92\x0e\xe3\x68\x36\xc7\x85\xea\xa0\xa8\x69\x69\xc5\x5b\xfb\x46\x52\xac\x2d\x75\x11\x9c\xd6\xb4\xa5\x40\x3b\xa9\x6d\xc2\x4b\x75\xf3\xde\xac\xb9\x61\x2e\x6b\x70\x1e\xca\x26\x99\xaa\x66\x39\xbd\x5d\x06\x9d\xf9\x88\xce\x09\xe5\x7e\xe8\x7a\x95\x72\x47\xc0\x9e\x1b\x54\x54\x5e\x8f\x59\xd0\x92\x82\xe5\x24\x78\xd2\x3f\x9e\x3b\xec\x9c\xaa\x3d\x74\x5e\xcc\x76\x86\xd0\x1e\x9c\xc4\xd5\x4e\x2a\x4b\xdd\xef\x73\xc7\xa6\x20\xe5\x7a\x19\x30\x9f\x02\x06\x0a\x36\xb2\xb3\xfd\xc7\xb9\xbd\x9f\x1b\xd2\x90\x55\x2e\xd9\xbe\xda\x02\xaf\x99\x2b\x24\x65\xb5\x6d\xb9\x73\xcc\xc1\x7e\x27\xcc\x85\xec\x5a\x30\x7b\xa4\xef\x4d\x99\x82\xad\x9b\x62\x36\x5a\xb5\x4c\x0f\xab\x41\xc3\xf0\xae\xea\xf2\x7c\x80\xc6\x8e\x36\xa5\x05\xcc\xb8\xb9\x7b\xca\x68\x5d\x18\xfe\x4c\x8d\x88\xd4\x13\x0f\x6c\x9f\xdb\xbb\x0a\xff\xfc\xa4\x7b\xf9\xe4\x0b\xf3\x8e\xdd\x1b\x70\xad\xb8\xd5\x5f\x80\x3a\x16\x04\xde\xc8\xc5\x20\x5c\x4a\xbf\x87\xaa\x0a\x23\x58\x36\x01\xe9\x75\x33\x9d\xf3\xe0\xe9\x75\x38\x9a\xfe\xf5\xa6\x99\x05\xff\x45\x8a\x8a\xd6\x2d\x52\x4e\xd5\x63\xc2\xb3\x05\x5a\x9c\x21\xdd\x93\x09\xcb\x49\x40\xd4\xb8\x96\x46\x88\xc1\x8f\x81\xba\x83\x76\x71\x55\x88\xe6\xd5\xce\x76\xd4\x8c\x47\xc2\x28\xa3\x59\x13\x60\xb0\xbc\x10\xfc\xaf\x9c\x7a\xbc\x39\xd9\xd6\x0d\xa3\xa7\xa2\x44\x5b\x96\x6b\xdf\x06\xa5\x4c\x5a\x71\x30\xab\x76\x01\xac\x0b\x4f\xf5\x7a\x85\x9e\xc5\x93\x40\xfc\x17\x4d\x17\xcf\x27\xa2\xc3\x34\xf6\xf7\x98\x3d\x3f\xd7\x2d\xd7\xe0\x99\x30\xe6\x1a\xa5\x64\xdb\x2c\xd9\x34\xe7\x23\xc1\xd6\xd2\xfd\x19\x77\x1f\x3e\x67\x65\xb4\x88\x48\xa4\xb9\x30\x94\xa6\x9c\x97\x40\x77\xad\xba\xd9\xea\xb6\x05\x35\xa8\x13\xe0\xd5\x80\x7f\x2b\xc0\x6f\xe4\xd8\x16\x05\xaa\xc2\x0d\xd0\x90\x33\x3a\xfc\x21\x56\x53\xe0\xe5\x32\x2c\xe8\xd7\x30\xa3\xc9\xb6\x09\x49\x59\x72\x44\x13\x8d\xb5\xd9\x1a\xee\xed\x65\xea\xfc\x58\x17\x69\x05\x6e\x9f\xbd\xde\xb6\x67\xa2\xb9\xa5\x7e\xa2\x1a\x9a\xb5\xfd\x38\x0d\x3d\x19\x6a\x37\x4e\x1f\x6b\x2b\x43\xed\x6a\x1f\x66\x07\x0b\x8b\x80\xb3\x05\x0d\xed\x80\x41\xf0\x8a\xaf\xf9\x09\x84\xae\xdc\x33\xce\x53\x58\xc6\xdc\xb9\x15\x61\x84\x3b\x74\x78\x60\xa9\x01\x08\x7e\x5b\x94\xe1\x0a\xdc\xeb\x35\xf0\x93\xa1\xdb\x65\x80\x6e\x28\x49\xd5\xc8\x35\x1e\x69\xf6\xb7\x70\x32\x73\xbc\xc6\x65\xea\x0b\x12\x0a\x47\xed\x4c\x87\x64\xba\x74\x65\x58\x2d\x5a\xe5\xc3\xa1\xd3\xbb\xbd\xdb\x0d\x69\x31\x77\x45\x5c\x17\x6a\xc0\x19\x0a\x8f\x9a\xc1\xa4\x77\xf5\x68\xdb\x52\xd1\x49\x08\x2b\xd9\xe0\xe4\x1a\xa8\x34\xfc\x33\x38\x00\xfa\xe4\xcb\x41\xdb\x72\x34\x4f\xcc\x51\x6e\x8b\x15\xae\xb9\x32\x0b\x31\x70\x4d\x06\x7a\x09\x88\x42\xc6\x89\xc1\xce\xa0\x24\x66\x67\x49\x8c\x74\x2a\xee\x4e\x1a\x88\x13\xc9\xa6\x27\xdb\x17\x41\x18\x67\xb8\x6a\x99\xde\x28\xa4\x59\x06\xca\x06\x30\x67\xa6\x62\xbf\x35\x6b\x4f\x5a\xf7\x26\x4c\xd8\Line truncated
|
||||
var _publicCssStylesCss = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xc4\x5b\x7b\x73\xdb\xb6\x96\xff\x3f\x33\xf9\x0e\xdc\x78\x3a\x79\x54\x64\x29\xd9\x92\x63\x79\xda\xa9\x93\xb8\xbb\x9e\x4d\xd2\x9d\x24\x33\x3b\xbd\x99\xfc\x01\x91\xa0\x84\x9a\x24\x38\x24\x65\xcb\xe9\xe4\xbb\xdf\x03\x10\x00\xf1\x22\x25\xfb\xa6\xf7\x5a\x6d\x4c\x13\xaf\x83\xf3\xfc\xe1\xe0\xe8\xa7\x17\xc1\xfb\xdf\x3f\xbc\xbb\x78\x7b\xf5\x8f\xcb\xe0\xf5\xc7\x8f\xc1\x8b\x9f\x1e\x3f\x7a\xfc\x68\xd3\x16\x79\xf0\xd7\xe3\x47\x01\xfc\x64\xb4\x6c\xc3\x0c\x15\x24\xbf\x5b\x06\x0d\x2a\x9b\xb0\xc1\x35\xc9\xce\xbb\xd6\xb0\x68\xc2\x16\xef\xda\xb0\x21\x5f\x71\x88\xd2\x3f\xb7\x4d\xbb\x0c\xa6\x71\xfc\x83\xec\x70\x8b\x57\xd7\xa4\x1d\xe8\xf4\xf8\xd1\x37\xb6\xde\x8a\xa6\x77\x72\xbd\x02\xd5\x6b\x52\x2e\x83\x58\xb4\xa1\xba\x25\x49\x8e\x27\xf0\xd4\x90\x94\xfd\x4e\x71\x8b\x48\xde\xc0\x53\x46\xd6\x09\xaa\x5a\x42\xcb\xee\x8f\x6d\xcd\xda\x33\x4a\x5b\x5c\xc3\xc3\x06\xa3\x94\x3f\x14\x88\xb0\x1e\x05\x2e\xb7\xf0\xab\x44\x37\xf0\x6f\x83\x13\x31\xb0\xd9\x16\xb0\xa8\x22\x20\x25\x4d\x95\x23\xd8\xec\x2a\xa7\xc9\xb5\xa4\x62\x9b\x12\x0a\x7d\x13\x54\xde\x20\xb6\x74\x55\xd3\x75\x8d\x1b\xf6\x78\x03\x64\x51\x67\x34\x29\x73\x52\xe2\xd0\x99\x64\x59\xd2\xf6\xd9\xe7\x04\xb8\x5a\xd3\xbc\xf9\xf2\xdc\x19\x58\xd2\x12\x0b\xe6\x6d\x30\x59\x6f\xda\x9e\x17\x72\x51\x39\xe6\x06\x33\xe6\xa0\x3c\x44\x39\x59\x03\xcf\x56\xa8\xc1\x6c\x55\xd1\xbd\xc5\x05\x4c\xd9\x32\x9e\x7c\xde\x90\x34\xc5\xe5\x17\xef\x6a\x92\x3c\xd9\xb8\x42\xc9\xf5\xba\xa6\xdb\x32\x0d\x13\x9a\xd3\x7a\x19\xb4\x35\x08\xbe\x42\x35\x2e\x5b\x9f\x5c\x53\x9c\xd0\x1a\x31\x76\x86\xcd\x35\xa9\x96\x01\x5d\xfd\x09\xec\x6d\xe4\xc4\x4b\x04\xbc\xbe\xe1\x32\x5c\x6e\x28\x50\x2d\x57\xa2\xdb\x96\x73\xe9\x96\xa4\xed\x46\x93\xf9\x6a\x55\x7f\x6e\x49\x9b\x63\x45\xf0\x8a\xd6\x20\xcb\x70\x45\xdb\x96\x16\x06\x93\x2c\x0a\x96\x01\xd0\x8d\x6b\x36\xed\xde\x0e\x41\x0a\xd3\xe1\x54\x6a\x21\xd3\x05\x90\x4a\xb9\x36\x74\xff\x56\x08\x81\x94\x1b\x50\xfc\xf6\xb0\xce\x2b\x9a\xc3\x1a\xa2\x6f\x9a\x95\x46\xa7\xa6\xbd\xcb\x31\x4c\xd8\x82\xd8\x12\xd1\x67\x33\x35\xbb\x80\xa5\x2c\x83\x19\x2e\xce\x2d\xab\x88\x16\xa7\xb8\x50\x8c\x82\xd7\xd7\xc3\x52\x3b\xca\xb2\x58\x8c\x97\x6f\xe2\x58\x0e\x6d\x0a\x94\xe7\x9e\x35\x5f\x2a\xab\x6c\xb6\x7c\x93\xdb\xca\xd3\xeb\x74\x2e\x0d\x9c\xcb\x4f\x29\xaa\x78\x59\xd1\x86\x74\xbc\xae\x31\x68\x20\xc8\xfe\xfc\x20\x8d\x85\x25\x7b\x81\x77\x92\x0e\xe3\x68\x36\xc7\x85\xea\xa0\xa8\x69\x69\xc5\x5b\xfb\x46\x52\xac\x2d\x75\x11\x9c\xd6\xb4\xa5\x40\x3b\xa9\x6d\xc2\x4b\x75\xf3\xde\xac\xb9\x61\x2e\x6b\x70\x1e\xca\x26\x99\xaa\x66\x39\xbd\x5d\x06\x9d\xf9\x88\xce\x09\xe5\x7e\xe8\x7a\x95\x72\x47\xc0\x9e\x1b\x54\x54\x5e\x8f\x59\xd0\x92\x82\xe5\x24\x78\xd2\x3f\x9e\x3b\xec\x9c\xaa\x3d\x74\x5e\xcc\x76\x86\xd0\x1e\x9c\xc4\xd5\x4e\x2a\x4b\xdd\xef\x73\xc7\xa6\x20\xe5\x7a\x19\x30\x9f\x02\x06\x0a\x36\xb2\xb3\xfd\xc7\xb9\xbd\x9f\x1b\xd2\x90\x55\x2e\xd9\xbe\xda\x02\xaf\x99\x2b\x24\x65\xb5\x6d\xb9\x73\xcc\xc1\x7e\x27\xcc\x85\xec\x5a\x30\x7b\xa4\xef\x4d\x99\x82\xad\x9b\x62\x36\x5a\xb5\x4c\x0f\xab\x41\xc3\xf0\xae\xea\xf2\x7c\x80\xc6\x8e\x36\xa5\x05\xcc\xb8\xb9\x7b\xca\x68\x5d\x18\xfe\x4c\x8d\x88\xd4\x13\x0f\x6c\x9f\xdb\xbb\x0a\xff\xfc\xa4\x7b\xf9\xe4\x0b\xf3\x8e\xdd\x1b\x70\xad\xb8\xd5\x5f\x80\x3a\x16\x04\xde\xc8\xc5\x20\x5c\x4a\xbf\x87\xaa\x0a\x23\x58\x36\x01\xe9\x75\x33\x9d\xf3\xe0\xe9\x75\x38\x9a\xfe\xf5\xa6\x99\x05\xff\x45\x8a\x8a\xd6\x2d\x52\x4e\xd5\x63\xc2\xb3\x05\x5a\x9c\x21\xdd\x93\x09\xcb\x49\x40\xd4\xb8\x96\x46\x88\xc1\x8f\x81\xba\x83\x76\x71\x55\x88\xe6\xd5\xce\x76\xd4\x8c\x47\xc2\x28\xa3\x59\x13\x60\xb0\xbc\x10\xfc\xaf\x9c\x7a\xbc\x39\xd9\xd6\x0d\xa3\xa7\xa2\x44\x5b\x96\x6b\xdf\x06\xa5\x4c\x5a\x71\x30\xab\x76\x01\xac\x0b\x4f\xf5\x7a\x85\x9e\xc5\x93\x40\xfc\x17\x4d\x17\xcf\x27\xa2\xc3\x34\xf6\xf7\x98\x3d\x3f\xd7\x2d\xd7\xe0\x99\x30\xe6\x1a\xa5\x64\xdb\x2c\xd9\x34\xe7\x23\xc1\xd6\xd2\xfd\x19\x77\x1f\x3e\x67\x65\xb4\x88\x48\xa4\xb9\x30\x94\xa6\x9c\x97\x40\x77\xad\xba\xd9\xea\xb6\x05\x35\xa8\x13\xe0\xd5\x80\x7f\x2b\xc0\x6f\xe4\xd8\x16\x05\xaa\xc2\x0d\xd0\x90\x33\x3a\xfc\x21\x56\x53\xe0\xe5\x32\x2c\xe8\xd7\x30\xa3\xc9\xb6\x09\x49\x59\x72\x44\x13\x8d\xb5\xd9\x1a\xee\xed\x65\xea\xfc\x58\x17\x69\x05\x6e\x9f\xbd\xde\xb6\x67\xa2\xb9\xa5\x7e\xa2\x1a\x9a\xb5\xfd\x38\x0d\x3d\x19\x6a\x37\x4e\x1f\x6b\x2b\x43\xed\x6a\x1f\x66\x07\x0b\x8b\x80\xb3\x05\x0d\xed\x80\x41\xf0\x8a\xaf\xf9\x09\x84\xae\xdc\x33\xce\x53\x58\xc6\xdc\xb9\x15\x61\x84\x3b\x74\x78\x60\xa9\x01\x08\x7e\x5b\x94\xe1\x0a\xdc\xeb\x35\xf0\x93\xa1\xdb\x65\x80\x6e\x28\x49\xd5\xc8\x35\x1e\x69\xf6\xb7\x70\x32\x73\xbc\xc6\x65\xea\x0b\x12\x0a\x47\xed\x4c\x87\x64\xba\x74\x65\x58\x2d\x5a\xe5\xc3\xa1\xd3\xbb\xbd\xdb\x0d\x69\x31\x77\x45\x5c\x17\x6a\xc0\x19\x0a\x8f\x9a\xc1\xa4\x77\xf5\x68\xdb\x52\xd1\x49\x08\x2b\xd9\xe0\xe4\x1a\xa8\x34\xfc\x33\x38\x00\xfa\xe4\xcb\x41\xdb\x72\x34\x4f\xcc\x51\x6e\x8b\x15\xae\xb9\x32\x0b\x31\x70\x4d\x06\x7a\x09\x88\x42\xc6\x89\xc1\xce\xa0\x24\x66\x67\x49\x8c\x74\x2a\xee\x4e\x1a\x88\x13\xc9\xa6\x27\xdb\x17\x41\x18\x67\xb8\x6a\x99\xde\x28\xa4\x59\x06\xca\x06\x30\x67\xa6\x62\xbf\x35\x6b\x4f\x5a\xf7\x26\x4c\xd8\Line truncated
|
||||
|
||||
func publicCssStylesCssBytes() ([]byte, error) {
|
||||
return bindataRead(
|
||||
@@ -92,12 +92,12 @@ func publicCssStylesCss() (*asset, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "public/css/styles.css", size: 19242, mode: os.FileMode(438), modTime: time.Unix(1467381276, 0)}
|
||||
info := bindataFileInfo{name: "public/css/styles.css", size: 19279, mode: os.FileMode(438), modTime: time.Unix(1467736858, 0)}
|
||||
a := &asset{bytes: bytes, info: info}
|
||||
return a, nil
|
||||
}
|
||||
|
||||
var _publicJsApplicationJs = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xd4\x3d\xfd\x73\xdb\xb6\x92\xbf\x67\x26\xff\x03\xca\xeb\x3c\x4a\x89\x2c\x27\x79\xd7\xb9\x19\x7f\x75\x52\xdb\x49\x7c\xcf\x71\x32\xb1\xfb\xee\x66\x6c\x37\xa1\x44\x48\x62\x43\x91\x3a\x7e\xd8\xd1\x6b\xfd\xbf\xdf\x2e\x3e\x48\x00\x04\x48\xca\x76\xaf\x3d\xf6\xbd\x48\x22\x17\x8b\xdd\xc5\x62\xbf\x00\xd0\x7e\x99\x53\x92\x17\x59\x34\x2d\xfc\xdd\xa7\x4f\x9e\x3e\x99\xa6\x49\x5e\x90\x82\x2e\x57\x27\x47\x64\x9f\x78\x9f\x67\xcb\xcf\x51\x52\xd0\x2c\x09\xe2\xcf\x78\x3b\xcd\x82\x6c\xfd\x39\x0a\xbd\xa7\x4f\x6e\x82\x8c\xe4\x34\xa6\xd3\x82\x86\x27\xf0\x2c\x87\x06\x97\xd7\x0c\xcd\xf6\x33\xd2\xfa\xdf\xd3\x27\xf0\x6f\xdb\xa5\x40\xbc\x3d\x3e\x3b\xfe\xf4\xfa\x94\xbc\xf9\xf9\xec\xf0\xe2\xe4\xc3\xd9\x79\x03\xa2\x15\x47\xeb\x7f\xdb\x8c\xd8\x6d\xf2\x89\x2e\xd3\x1b\x9a\x93\x20\x21\xc0\xd0\x92\x26\xc5\x88\x44\x33\x42\xbf\x45\x79\x91\x8f\xc8\x2c\x4b\x97\xf8\x2c\xc8\xb2\x60\xfd\xf4\xc9\x6b\xfc\x18\xaf\xb2\xb4\x48\x8b\xf5\x8a\x8e\x33\xd6\xfa\x98\x37\x04\x21\xcc\xca\x64\x5a\x44\x69\x32\x10\xb8\x86\xe4\x37\x20\x05\x2e\x94\x58\x04\x00\xc5\x22\xca\xc7\x51\x12\xd2\x6f\x1f\x66\x15\xd0\x2e\x87\x81\x6e\x07\x11\xf9\x6e\x9f\x6c\xbd\xac\xda\xe1\xc5\xda\xe4\xab\x38\x9a\xd2\x41\x34\x22\x2f\x25\xfc\xdd\xd3\x27\x77\x15\x17\xab\x38\x98\x6a\x6c\x90\x28\xc9\xa3\x90\x56\xc4\x93\xc9\x1a\xbe\xa7\xc5\x82\x66\x36\x3e\x58\x7b\x0b\x23\x13\x3a\x8f\x92\x11\xa1\x49\xd8\xce\x0b\x83\xeb\xc3\xc9\x65\x74\x0d\x6d\x01\x5f\x93\x8b\x73\xb8\x0b\x2c\x90\x69\x9a\x17\xe5\x92\xd0\x1b\xa4\xa5\x48\x49\x54\x80\xb2\xcd\x9e\x3e\x39\x4a\xa7\x25\xd2\xa7\x10\x9e\x43\x93\x43\x06\x7e\x7c\x63\x50\x5e\xd0\x6f\xb5\xfc\x19\xad\x61\x94\xaf\x82\x62\xba\x60\xa0\x83\x84\xde\x92\xc3\x32\x2f\x52\xde\x94\xc3\x23\x07\x92\x9c\xb7\xb4\xc8\xa1\x21\x05\x7a\x60\x1e\x00\xf2\x74\xc6\x88\x4b\xbf\x46\xd4\x4a\xcc\x9c\x16\x87\xec\xa9\x4a\x46\x12\x2c\xa9\x26\xba\x0c\x1f\x63\xe7\x9f\xe8\xfc\xf8\xdb\x6a\xe0\x0d\x7e\xdc\x81\xff\xfd\xf2\xfb\xf8\xd9\xee\xd5\x55\xfe\x6c\xe8\x91\xe7\x04\x5b\xc1\x87\x87\x37\xae\xae\xf6\xf1\x63\x70\xf9\xcb\xee\xf5\xb3\xe1\xf8\xd9\xf7\xc3\xdf\x7f\x81\x7f\x3d\x29\xed\x8c\x16\x65\x96\x90\x50\x12\xc4\x29\x94\x63\x3a\xc8\xe8\x88\x78\xdf\xbf\xf4\x54\xd6\x0e\x17\x41\x32\x47\x75\x21\x93\xb2\x28\xd2\x04\xa5\x8c\x9c\xc6\x69\x10\x46\xc9\x1c\x14\x25\x5a\x06\x48\xfe\xd3\x27\x42\x27\x14\x36\xa7\xac\xf1\x45\x7a\x2a\x80\x15\x66\x2b\x46\x63\x5a\x54\x8a\xc8\x35\x65\xb7\x7e\x90\x66\x11\x28\x4b\x10\x5f\x80\xc4\x51\x17\x44\x0f\x51\x92\xd0\xec\xdd\xc5\xfb\x53\x66\x48\x10\x58\x3e\xc9\x8b\x75\x4c\xc7\xe9\x2a\x98\x46\xc5\x1a\x5a\xbc\xa8\x20\x72\x5a\x5c\x44\x4b\x9a\x96\xc5\xa0\x49\x84\x8a\xa2\x42\x0e\xcd\xfd\xbd\x88\x4c\xe3\x20\xcf\xf7\x3d\xe0\x92\x66\x51\x10\x6f\x45\x68\xff\x48\xbe\x8a\x12\xef\x20\x28\x8b\x34\xa3\x30\x44\x7b\xdb\xd1\x81\xbf\xdb\x44\x66\xd2\xf3\x52\xea\xf2\x88\xbc\x7a\xf1\x62\x58\x51\x27\x46\x46\xe5\xd7\x36\x08\xf5\x9c\x85\x61\x08\xd3\x84\xf6\x93\xff\x11\x42\xaa\x36\x27\xcb\xd2\x6c\x44\x16\xc5\x32\xd6\xf5\xde\x2d\x3e\x1c\x0d\x00\xc9\xc2\xf3\x82\xae\xe0\x09\xc8\x6e\xff\xa0\x61\x7b\x54\xd9\x21\xf6\x5d\xd3\x36\x59\xc4\x51\x83\xa0\x31\xd0\x9c\xc5\x38\xa6\xc9\xbc\x58\x90\x7d\xa0\x84\xfc\xed\x6f\xb5\xe2\xc2\xfc\x11\xdc\xfe\xb4\x3e\x09\x07\x7e\x0c\x36\x18\x14\xcc\x1f\x6a\x23\x8a\x57\xd5\xc4\x98\xff\x03\x9f\x0b\x27\xdc\x92\x3d\xfa\x43\x85\xda\xbb\xca\xe4\xd4\xec\xe7\x14\x46\xbe\x9d\x7f\x9b\xfc\x24\x80\xa2\x80\x95\x20\x2b\x2d\x68\x74\x36\x8b\xb2\xbc\x70\xf5\x85\x82\x62\x63\xd8\x60\xb7\x31\x0a\x4e\x0d\xf6\x0e\xa6\x71\x9a\x53\x53\x71\xef\x40\xc3\xc0\xdf\x3f\x00\x2d\xaa\x65\x03\xab\x3a\xcc\x3d\x34\x41\x91\x55\x2d\x75\x70\x68\x2f\x2c\xd2\x52\x27\xb6\x14\x9a\x26\x57\x31\xb7\x66\x01\x30\xa6\x4c\xaa\x77\x41\x12\xc6\x94\xdb\xed\x74\x45\x01\x20\x8a\xa9\xb4\x72\xcc\xa3\xf0\xf0\x05\x9f\x35\x5c\x06\x7b\x5e\x49\x1f\xc7\x83\x71\xc5\x44\x72\x0a\xca\x38\x46\x4f\x10\x80\x63\x1d\xf8\xe0\x4b\x82\x49\x8c\xfa\xa5\x8d\x96\x41\x95\xc6\x92\x6b\x22\x68\x08\x6e\xc1\xa1\xa6\xb7\x63\x24\x4f\x07\xbe\x7c\x71\x0d\x0e\xc1\xff\x31\x0b\x6e\xf7\x8b\xac\xa4\x9a\x62\xb7\x75\xab\x62\x14\xdf\xe3\x74\xca\xac\x8b\x1d\x61\x0f\xc9\x86\x40\x59\x61\x13\x2b\x7f\xd0\x21\x58\x36\xed\x60\x62\xc7\xcc\x7c\x89\x6e\x6a\x19\x7d\xd7\x29\xa4\x46\xec\x69\xf0\x75\xad\x4e\x50\xd9\x11\xf2\x78\xaf\x21\xe1\xc1\x12\x46\x82\x3a\xec\x70\x3c\x4b\xb3\xe3\x60\xba\x18\xc4\x51\xf2\xd5\x98\xcc\x92\x4f\xb4\x97\xd0\xb9\xcb\xc6\x79\x5c\x60\xde\xd0\xf4\xaa\x03\x75\x78\x25\xb2\x8c\xfe\x4f\x49\xf3\x42\xc4\x0f\xff\xfd\xfe\xf4\x5d\x51\xac\x3e\xf1\x9b\x83\xa1\x36\xd7\xf8\x40\xb2\x27\x7c\xe8\xfd\xa3\xe3\xd3\xe3\x8b\x63\x7f\x44\x90\x5a\x13\xbb\x04\x45\x7b\xda\xe8\xba\xc2\x93\x64\x34\x08\xd7\x79\x01\xb6\x81\x93\x6b\xf5\xfd\xea\x85\x02\x96\xcd\x59\xe3\x73\x6c\x8c\xa6\xff\xdf\xad\xf0\x66\x1b\xec\xab\xcc\x11\x1e\xa7\xbe\xab\x45\x35\x94\x6c\xac\x5b\xc1\xf0\x32\xb4\x65\x0c\x41\xe1\x82\x05\x5c\xfb\x22\x1d\x38\x0d\xf2\xe2\x28\xca\x60\xa8\xd3\x6c\xfd\x31\xc8\x0a\x08\x70\x5d\x8d\x4c\x61\xa9\x97\xdd\xec\x9a\x97\x4b\x37\xd8\x38\x89\x14\xa3\x31\x26\xe6\xa5\x6b\xb1\x96\x97\x0c\x6c\x03\xae\x91\x69\x7f\xe4\xb8\xed\x74\xd7\x5c\xLine truncated
|
||||
var _publicJsApplicationJs = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xd4\x3d\xfd\x73\xdb\xb6\x92\xbf\x67\x26\xff\x03\xca\xeb\x3c\x4a\xad\x2c\x27\x7d\xd7\xb9\x19\x7f\x75\x52\xdb\x4d\x7c\xcf\x71\x32\xb1\xfa\xee\x66\x6c\x37\xa1\x45\x48\x62\x43\x91\x3c\x7e\xd8\xf1\x6b\xfd\xbf\xdf\x2e\x3e\x48\x00\x04\x48\xca\x76\xaf\x3d\xf6\xbd\x48\x22\x17\x8b\xdd\xc5\x62\xbf\x00\xd0\x7e\x55\x50\x52\x94\x79\x34\x2f\xfd\xdd\xe7\xcf\x9e\x3f\x9b\xa7\x49\x51\x92\x92\xae\xb3\x93\x23\xb2\x4f\xbc\x8f\x8b\xf5\xc7\x28\x29\x69\x9e\x04\xf1\x47\xbc\x9d\xe6\x41\x7e\xf7\x31\x0a\xbd\xe7\xcf\x6e\x82\x9c\x14\x34\xa6\xf3\x92\x86\x27\xf0\xac\x80\x06\x17\x57\xbb\xfc\x41\x99\x7e\xa6\x09\x62\xf0\x18\xde\xed\x6f\x48\xe7\x7f\xcf\x9f\xc1\xbf\x5d\x97\x02\xf1\xfa\xf8\xec\xf8\xc3\xab\x53\xf2\xd3\xcf\x67\x87\xb3\x93\x77\x67\xe7\x2d\x88\x4e\x1c\x9d\xff\x6d\x33\x62\xb7\xc9\x07\xba\x4e\x6f\x68\x41\x82\x84\x00\x87\x6b\x9a\x94\x13\x12\x2d\x08\xfd\x12\x15\x65\x31\x21\x8b\x3c\x5d\xe3\xb3\x20\xcf\x83\xbb\xe7\xcf\x5e\xe1\xc7\x34\xcb\xd3\x32\x2d\xef\x32\x3a\xcd\x59\xeb\x63\xde\x10\x84\xb0\xa8\x92\x79\x19\xa5\xc9\x48\xe0\x1a\x93\xdf\x80\x14\xb8\x50\x52\x11\x00\x94\xab\xa8\x98\x46\x49\x48\xbf\xbc\x5b\xd4\x40\xbb\x1c\x06\xba\x1d\x45\xe4\xab\x7d\xb2\xf5\xb2\x6e\x87\x17\x6b\x53\x64\x71\x34\xa7\xa3\x68\x42\x5e\x4a\xf8\xfb\xe7\xcf\xee\x6b\x2e\xb2\x38\x98\x6b\x6c\x90\x28\x29\xa2\x90\xd6\xc4\x93\xeb\x3b\xf8\x9e\x96\x2b\x9a\xdb\xf8\x60\xed\x2d\x8c\x5c\xd3\x65\x94\x4c\x08\x4d\xc2\x6e\x5e\x18\xdc\x10\x4e\x2e\xa2\x2b\x68\x0b\xf8\xda\x5c\x9c\xc3\x5d\x60\x81\xcc\xd3\xa2\xac\xd6\x84\xde\x20\x2d\x65\x4a\xa2\x12\xb4\x6f\xf1\xfc\xd9\x51\x3a\xaf\x90\x3e\x85\xf0\x02\x9a\x1c\x32\xf0\xe3\x1b\x83\xf2\x92\x7e\x69\xe4\xcf\x68\x0d\xa3\x22\x0b\xca\xf9\x8a\x81\x8e\x12\x7a\x4b\x0e\xab\xa2\x4c\x79\x53\x0e\x8f\x1c\x48\x72\x5e\xd3\xb2\x80\x86\x14\xe8\x81\x89\x01\xc8\xd3\x05\x23\x2e\xfd\x1c\x51\x2b\x31\x4b\x5a\x1e\xb2\xa7\x2a\x19\x49\xb0\xa6\x9a\xe8\x72\x7c\x8c\x9d\x7f\xa0\xcb\xe3\x2f\xd9\xc8\x1b\xfd\xb0\x03\xff\xfb\xe5\xf7\xe9\x37\xbb\x97\x97\xc5\x37\x63\x8f\x7c\x4b\xb0\x15\x7c\x78\x78\xe3\xf2\x72\x1f\x3f\x46\x17\xbf\xec\x5e\x7d\x33\x9e\x7e\xf3\xf5\xf8\xf7\x5f\xe0\x5f\x4f\x4a\x3b\xa7\x65\x95\x27\x24\x94\x04\x71\x0a\xe5\x98\x8e\x72\x3a\x21\xde\xd7\x2f\x3d\x95\xb5\xc3\x55\x90\x2c\x51\x5d\xc8\x75\x55\x96\x69\x82\x52\x46\x4e\xe3\x34\x08\xa3\x64\x09\x8a\x12\xad\x03\x24\xff\xf9\x33\xa1\x13\x0a\x9b\x73\xd6\x78\x96\x9e\x0a\x60\x85\xd9\x9a\xd1\x98\x96\xb5\x22\x72\x4d\xd9\x6d\x1e\xa4\x79\x04\xca\x12\xc4\x33\x90\x38\xea\x82\xe8\x21\x4a\x12\x9a\xbf\x99\xbd\x3d\x65\x86\x04\x81\xe5\x93\xa2\xbc\x8b\xe9\x34\xcd\x82\x79\x54\xde\x41\x8b\x17\x35\x44\x41\xcb\x59\xb4\xa6\x69\x55\x8e\xda\x44\xa8\x28\x6a\xe4\xd0\xdc\xdf\x8b\xc8\x3c\x0e\x8a\x62\xdf\x03\x2e\x69\x1e\x05\xf1\x56\x84\x06\x91\x14\x59\x94\x78\x07\x41\x55\xa6\x39\x85\x21\xda\xdb\x8e\x0e\xfc\xdd\x36\x32\x93\x9e\x97\x52\x97\x27\xe4\xbb\x17\x2f\xc6\x35\x75\x62\x64\x54\x7e\x6d\x83\xd0\xcc\x59\x18\x86\x30\x4d\xe8\x30\xf9\x1f\x21\xa4\x6a\x73\xf2\x3c\xcd\x27\x64\x55\xae\x63\x5d\xef\xdd\xe2\xc3\xd1\x00\x90\x3c\x3c\x2f\x69\x06\x4f\x40\x76\xfb\x07\x2d\xdb\xa3\xca\x0e\xb1\xef\x9a\xb6\xc9\x22\x8e\x06\x04\x8d\x81\xe6\x3d\xa6\x31\x4d\x96\xe5\x8a\xec\x03\x25\xe4\x6f\x7f\x6b\x14\x17\xe6\x8f\xe0\xf6\xc7\xbb\x93\x70\xe4\xc7\x60\x83\x41\xc1\xfc\xb1\x36\xa2\x78\xd5\x4d\x8c\xf9\x3f\xf2\xb9\x70\xc2\x2d\xd9\xa3\x3f\x56\xa8\xbd\xaf\x4d\x4e\xc3\x7e\x41\x61\xe4\xbb\xf9\xb7\xc9\x4f\x02\x28\x0a\x58\x0b\xb2\xd6\x82\x56\x67\x8b\x28\x2f\x4a\x57\x5f\x28\x28\x36\x86\x2d\x76\x5b\xa3\xe0\xd4\x60\xef\x60\x1e\xa7\x05\x35\x15\xf7\x1e\x34\x0c\x02\x80\x47\xa0\x45\xb5\x6c\x61\x55\x87\x79\x80\x26\x28\xb2\x6a\xa4\x0e\x0e\xed\x85\x45\x5a\xea\xc4\x96\x42\xd3\xe4\x2a\xe6\xd6\x22\x00\xc6\x94\x49\xf5\x26\x48\xc2\x98\x72\xbb\x9d\x66\x10\x99\x2c\xa2\x98\x4a\x2b\xc7\x3c\x0a\x0f\x5b\xf0\x59\xcb\x65\xb0\xe7\xb5\xf4\x71\x3c\x18\x57\x4c\x24\xa7\xa0\x8c\x53\xf4\x04\x01\x38\xd6\x91\x0f\xbe\x24\xb8\x8e\x51\xbf\xb4\xd1\x32\xa8\xd2\x58\x72\x4d\x04\x0d\xc1\x2d\x38\xd4\xf4\x76\x8a\xe4\xe9\xc0\x17\x2f\xae\xc0\x21\xf8\x3f\xe4\xc1\xed\x7e\x99\x57\x54\x53\xec\xae\x6e\x55\x8c\xe2\x7b\x9c\xce\x99\x75\xb1\x23\x1c\x20\xd9\x10\x28\x2b\x6d\x62\xe5\x0f\x7a\x04\xcb\xa6\x1d\x4c\xec\x98\x99\x2f\xd1\x4d\x23\xa3\xaf\x7a\x85\xd4\x0a\x46\x0d\xbe\xae\xd4\x09\x2a\x3b\x42\x1e\x1f\x34\x24\x3c\x58\xc2\x48\x50\x87\x1d\x4f\x17\x69\x7e\x1c\xcc\x57\xa3\x38\x4a\x3e\x1b\x93\x59\xf2\x89\xf6\x12\x3a\x77\xd9\x38\x8f\x0b\xcc\x1b\x9b\x5e\x75\xa4\x0e\xaf\x44\x96\xd3\xff\xa9\x68\x51\x8a\xf8\xe1\xbf\xdf\x9e\xbe\x29\xcb\xec\x03\xbf\x39\x1a\x6b\x73\x8d\x0f\x24\x7b\xc2\x87\xde\x3f\x3a\x3e\x3d\x9e\x1d\xfb\x13\x82\xd4\x9a\xd8\x25\x28\x4c\x3b\x81\xef\x0d\x0d\x42\x9a\x8f\xfc\x19\xc6\xf7\xd0\x8a\xc5\xf9\xee\x66\x49\xd8\xa2\xb8\xee\x3e\xc9\x01\xd7\x5d\x51\x82\x49\xe1\x5c\x5a\x43\x06\xf5\xc2\x71\x91\xcd\x59\xe3\x73\x6c\x8c\x1e\xe3\xdf\xad\xf0\x66\x1b\xec\xab\x2a\x10\x1e\x2d\x86\xab\x45\xad\x01\x4c\x45\x3a\xc1\xf0\x32\x94\x6c\x0a\xb1\xe4\x8a\xc5\x69\xfb\x22\x8b\x38\x0d\x8a\xf2\x28\xca\x41\x43\xd2\xfc\xee\x7d\x90\x97\x10\x17\xbb\x1a\x99\xc2\x52\x2f\xbb\xb5\x36\xLine truncated
|
||||
|
||||
func publicJsApplicationJsBytes() ([]byte, error) {
|
||||
return bindataRead(
|
||||
@@ -112,7 +112,7 @@ func publicJsApplicationJs() (*asset, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "public/js/application.js", size: 26940, mode: os.FileMode(438), modTime: time.Unix(1467366883, 0)}
|
||||
info := bindataFileInfo{name: "public/js/application.js", size: 27506, mode: os.FileMode(438), modTime: time.Unix(1467737121, 0)}
|
||||
a := &asset{bytes: bytes, info: info}
|
||||
return a, nil
|
||||
}
|
||||
@@ -157,7 +157,7 @@ func templatesActionsTmpl() (*asset, error) {
|
||||
return a, nil
|
||||
}
|
||||
|
||||
var _templatesBaseTmpl = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xb4\x57\xd1\x6f\xdb\xb6\x13\x7e\xef\x5f\xc1\x12\x3f\xc0\x0f\xbf\x58\x72\xbb\xed\x25\x90\x3c\x0c\x49\x86\x05\x48\xb7\x20\x6e\x51\xec\xc9\xa0\xa5\xb3\xc5\x94\x22\x35\x92\x72\x62\x04\xfe\xdf\x77\x24\x25\x4b\x72\x6c\xd7\x45\xbb\x87\x20\x32\x75\xfc\xee\xbb\xbb\x8f\xc7\x53\xf2\xf6\xfa\xaf\xab\x8f\x7f\xdf\xdf\x90\xc2\x96\x62\xfa\x26\x09\xff\x48\x52\x00\xcb\xf1\x3f\x49\x2c\xb7\x02\xa6\x2f\x2f\xd1\x9f\xac\x84\xed\x36\x89\xc3\x82\x7b\x55\x82\x65\x44\xe2\x72\x4a\xd7\x1c\x9e\x2a\xa5\x2d\x25\x99\x92\x16\xa4\x4d\xe9\x13\xcf\x6d\x91\xe6\xb0\xe6\x19\x8c\xfd\x8f\x0b\xc2\x25\xb7\x9c\x89\xb1\xc9\x98\x80\xf4\x5d\x34\xa1\x1e\x48\x70\xf9\x85\x14\x1a\x96\x29\x2d\xac\xad\xcc\x65\x1c\x2f\x11\xc6\x44\x2b\xa5\x56\x02\x58\xc5\x4d\x94\xa9\x32\xe6\x08\xfe\xeb\x92\x95\x5c\x6c\xd2\x0f\xcc\x82\x46\xac\xff\xdf\xe2\xa2\xa1\x44\x83\x48\xa9\xb1\x1b\x01\xa6\x00\xb0\xfb\xc0\xa3\x93\xc0\x99\x31\x2d\xee\x83\x5a\x28\xab\x2e\x7f\x9e\x4c\x2e\x7e\x99\x4c\x46\x1e\x77\xd4\xe1\x8e\x88\xdd\x54\x90\x8e\x2c\x3c\x5b\xb7\x6d\xd4\xf9\xd9\x67\xd0\x44\xf4\xf2\x42\xa2\x2b\x25\x97\x7c\x15\xfd\xb6\x30\x4a\xd4\x16\x3e\x3d\xdc\x91\xed\x36\x9e\x2f\xb9\x80\x92\x49\xb6\xc2\x48\x30\x6b\x5a\x32\xe1\x30\xe3\x00\x12\xe1\x23\x86\x81\xf8\x08\xc1\x97\x44\xc2\x0e\x68\xe6\x0c\x66\xce\x0b\xa1\x14\xa1\xd0\x86\x24\x7e\x97\xa3\xe3\x36\xbc\xb6\x6c\xac\xe2\x9d\x19\xa2\x82\xcc\xfd\xee\x24\x6e\xea\x9d\x2c\x54\xbe\xf1\x21\xb9\x05\xd0\x1e\x2e\xc9\xf9\xba\xc5\x25\xff\x13\x18\xea\x65\x4a\xa2\x7b\x8d\xa5\x55\xb5\xb9\x73\xb1\x07\xf0\x8e\xa8\xb7\xa2\xb4\x59\x26\x09\xeb\x92\xe1\x5f\x6d\xb7\x34\x20\xf6\x59\x90\xc6\x17\xc9\x04\x33\x26\xa5\x2c\xb3\x5c\xc9\x80\x09\xff\x74\x98\x24\xe7\x86\x2d\x04\xe4\xbb\xbd\x94\xf0\x3c\xa5\x15\x32\x6a\x61\x49\xc2\x5b\x98\xb2\x51\xca\x98\x7b\xa5\x4c\x4d\xbd\xc8\xb9\x86\xcc\x2a\xbd\x99\x33\xad\xd5\xd3\x5c\xc0\xd2\x26\x31\x6f\xf6\x26\xf1\x2e\xe0\xe3\x11\xc5\x6c\x97\x92\x86\xff\x9b\xc3\xfc\x03\x37\x55\x81\x1c\x4b\xd6\xf1\x3b\xc5\xb0\x04\x59\xef\xe8\x34\x6c\xc2\x73\x35\x7d\x9d\xd0\x90\x9d\x43\x1a\xf3\xda\x88\x1d\x43\x61\x00\x1f\x8f\x4a\xb1\x4b\x64\x4b\x2f\xe0\xb6\xd6\x7f\xd4\x2b\x75\x23\x7d\xce\xd1\xc8\xfd\xea\x40\x7f\x47\x11\x93\x0f\x41\xc5\xfb\xc5\x6c\x93\xd4\x53\xb0\x6b\x23\x84\xc6\xbb\x44\x9e\x48\x43\x56\xc0\x5a\x2b\x39\xd7\x7c\x55\xf8\xf2\x38\xfe\x7e\x7f\xe7\xa0\xda\xaf\xc2\x30\x63\x9d\x74\xf7\x6a\xa3\xa4\xd8\x8c\x0d\xcf\xa1\x57\x90\x33\x04\x4e\xc8\x49\x55\xb4\x8e\x8e\xcb\xbd\x03\xe8\x27\xea\x00\xc1\xef\x12\xff\x57\x15\xf6\xd5\x33\xd0\x22\xc4\xfd\x04\x9e\x15\xfb\xae\xe6\xfb\x91\xf6\x57\x77\x42\x3e\x90\xb1\xff\x44\xcf\x03\xf2\xdf\x29\xeb\x23\x91\x76\x6a\x24\xc3\x53\xdb\xf9\xbd\x35\xd7\x5c\xf7\x52\xe1\x0b\xee\xaa\x67\x80\xe9\xac\x18\xb2\x3d\x51\x3d\x2c\x1b\xf2\xda\xaf\x56\xc2\x65\x55\xdb\x70\x41\x51\x77\x41\x51\x52\x09\x96\x41\xa1\x04\xb6\xf2\x94\xde\x3c\x43\x86\x29\x22\x0c\x2f\xe9\x12\xef\x9d\x3c\x8a\xa2\x3d\x97\x8e\xf4\x67\xcd\xd1\x68\xa3\x6a\x4d\x56\xdc\x5e\x90\x12\x74\x56\x3b\xf7\x44\x69\x62\xd6\xb2\xdd\x4d\xdc\x1f\xca\xce\x18\xcc\x0e\x12\x8c\x86\x62\xd9\xcb\xc0\xd1\xce\xe8\x46\x87\x3e\x8b\xe3\x61\x3b\xcb\xb9\xbb\x97\xf0\xba\xf5\xc1\xe3\x9d\x57\x31\x39\x9d\x3d\x71\x9b\x15\xc4\xbd\xc6\xeb\xcd\xad\x74\x4e\x87\xfa\x3d\xc6\xa1\xae\x84\x62\xf9\x79\x2c\xdc\xa5\x3d\x0f\x1b\x7a\x1c\x3e\x35\x0b\x27\xdd\x77\xea\xea\x2f\x59\x28\xb1\x4c\x98\xf2\x86\x12\x0e\x33\x51\xcf\xe4\xf5\x01\x3a\x16\x85\x50\x2b\x55\xdb\xb3\x6e\x18\x78\xe6\x76\x6e\xd5\x9c\x55\x55\x2f\x88\x3b\x0f\xb0\x17\x44\x17\x43\xef\xa9\xd5\xad\x5a\x83\x16\x6c\x43\xa7\xbb\x77\x61\x94\x70\x93\xc3\x9b\xa1\xec\xdb\xe6\xdc\x6e\xb5\x4a\x89\x05\xd3\x0d\xdd\x5e\xa3\x3e\x16\xde\x82\x65\x5f\xce\xb8\xde\x43\x37\x73\xc6\x87\x6f\xf4\xae\xf5\xf8\xa0\x9b\xe3\x27\xb0\x17\x42\x3e\x96\x75\xb9\x00\xe4\x34\x19\x26\xa1\x7d\x1f\xed\x8e\x78\x0f\x31\x19\x4c\x0b\xa7\xaa\x79\x20\x95\x83\xea\x26\x25\xe3\xc1\xe7\x00\xa8\x19\xa9\x11\xe8\x9a\xe1\xc4\xed\xc1\x92\x38\xd8\xba\xc7\xa5\x52\xb6\x19\xd5\x66\xa0\xd7\xd8\xcc\xf0\x40\x14\xde\x0d\x0b\x53\xa9\x54\x6e\xfe\x00\x4d\xa4\xc2\x2e\x0b\x5a\x63\x8c\x7b\x03\x77\xc6\xf2\x7c\x63\xdc\x76\xed\x46\x62\x3a\xbd\x72\x0b\x6d\x8f\xc3\xa3\xfe\x8d\x78\xd8\x3a\x8a\x7a\xe1\xa7\xeb\x82\x65\x39\x67\x26\xb8\x18\xf7\x86\x5e\x3a\xed\x77\x59\xe7\x2b\x6a\x82\x3f\xda\xa4\x3f\x23\x2c\x36\xb0\xa5\x60\x6b\xd7\xa0\xd4\x32\x24\xf6\x47\xf3\x72\x4e\x3d\x9f\x7e\xeb\x4f\xe2\x36\xd3\xee\xc7\xdb\xf1\x98\xcc\xae\x1e\x6e\xef\x3f\xce\xc8\x78\xec\xa5\x6f\x32\xcd\x2b\x4b\x8c\xce\x7a\x79\xcd\xe5\x23\x8e\xf2\x42\xd5\x39\x92\xd6\xe0\x3d\xb3\x47\xf6\x1c\x0b\xbe\x30\x31\xb6\xe7\xf8\x5d\xf4\x3e\xfa\xc9\x3d\x45\x8f\xc6\x9d\xa4\x00\xf3\x0a\xf1\x1b\x3f\x24\x1e\x0d\xd2\xd5\xe5\x7b\xf4\xfe\x83\x61\xb1\x69\x08\x9e\x31\xa7\xee\x57\xd0\xa7\x6a\x77\xae\xdb\x02\x77\x9d\xe5\x6f\xf0\x05\x13\xbe\x5c\xb0\xfd\xf8\x2f\xd8\x7f\x03\x00\x00\xff\xff\x90\x16\xb3\x56\xd9\x0e\x00\x00")
|
||||
var _templatesBaseTmpl = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xb4\x57\xdf\x6f\xdb\x36\x10\x7e\xcf\x5f\xc1\x12\x03\xfc\xb0\x58\x72\xbb\xed\x25\x90\x3c\x0c\x49\x86\x05\x48\xb7\x20\x4e\x51\xec\xc9\xa0\xa5\xb3\xc5\x84\x22\x35\x92\x72\x62\x04\xfe\xdf\x77\xa4\x24\xeb\x47\x6c\xd7\x45\xdb\x87\x20\x32\x45\x7e\xf7\xdd\x77\xc7\xbb\x53\xf4\xee\xea\x9f\xcb\x87\x7f\xef\xae\x49\x66\x73\x31\x3d\x8b\xaa\x7f\x24\xca\x80\xa5\xf8\x9f\x44\x96\x5b\x01\xd3\xd7\xd7\xe0\x6f\x96\xc3\x76\x1b\x85\xd5\x82\x7b\x95\x83\x65\x44\xe2\x72\x4c\xd7\x1c\x9e\x0b\xa5\x2d\x25\x89\x92\x16\xa4\x8d\xe9\x33\x4f\x6d\x16\xa7\xb0\xe6\x09\x8c\xfd\x8f\x73\xc2\x25\xb7\x9c\x89\xb1\x49\x98\x80\xf8\x7d\x30\xa1\x1e\x48\x70\xf9\x44\x32\x0d\xcb\x98\x66\xd6\x16\xe6\x22\x0c\x97\x08\x63\x82\x95\x52\x2b\x01\xac\xe0\x26\x48\x54\x1e\x72\x04\xff\x7d\xc9\x72\x2e\x36\xf1\x47\x66\x41\x23\xd6\xcf\x37\xb8\x68\x28\xd1\x20\x62\x6a\xec\x46\x80\xc9\x00\xec\x10\x78\x74\x14\x38\x31\xa6\xc1\xbd\x57\x0b\x65\xd5\xc5\xaf\x93\xc9\xf9\x6f\x93\xc9\xc8\xe3\x8e\x5a\xdc\x11\xb1\x9b\x02\xe2\x91\x85\x17\xeb\x8e\x8d\x5a\x3b\x43\x06\xb5\x47\xaf\xaf\x24\xb8\x54\x72\xc9\x57\xc1\x1f\x0b\xa3\x44\x69\xe1\xd3\xfd\x2d\xd9\x6e\xc3\xf9\x92\x0b\xc8\x99\x64\x2b\xf4\x04\x55\xd3\x92\x09\x87\x19\x56\x20\x01\x3e\xa2\x1b\x88\x8f\x10\x7c\x49\x24\xec\x80\x66\x6e\xc3\xcc\x59\x21\x94\x22\x14\xee\x21\x91\x3f\xe5\xe8\xb8\x03\x6f\x77\xd6\xbb\xc2\xdd\x36\x44\x05\x99\xfa\xd3\x51\x58\xc7\x3b\x5a\xa8\x74\xe3\x5d\x72\x0b\xa0\x3d\x5c\x94\xf2\x75\x83\x4b\x7e\x12\xe8\xea\x45\x4c\x82\x3b\x8d\xa1\x55\xa5\xb9\x75\xbe\x57\xe0\x2d\x51\xbf\x8b\xd2\x7a\x99\x44\xac\x15\xc3\xbf\xda\x6e\x69\x85\xd8\x65\x41\x6a\x5b\x24\x11\xcc\x98\x98\xb2\xc4\x72\x25\x2b\x4c\xf8\xaf\xc5\x24\x29\x37\x6c\x21\x20\xdd\x9d\xa5\x84\xa7\x31\x2d\x90\x51\x03\x4b\x22\xde\xc0\xe4\x75\xa6\x8c\xb9\xcf\x94\xa9\x29\x17\x29\xd7\x90\x58\xa5\x37\x73\xa6\xb5\x7a\x9e\x0b\x58\xda\x28\xe4\xf5\xd9\x28\xdc\x39\x7c\xd8\xa3\x90\xed\x24\xa9\xf9\x9f\xed\xe7\x5f\x71\x53\x05\xc8\xb1\x64\x2d\xbf\x63\x0c\x73\x90\xe5\x8e\x4e\xcd\xa6\x7a\x2e\xa6\x6f\x05\xad\xd4\xd9\x97\x63\x3e\x37\x42\xc7\x50\x18\xc0\xc7\x83\xa9\xd8\x0a\xd9\xd0\xab\x70\x9b\xdd\x7f\x95\x2b\x75\x2d\xbd\xe6\xb8\xc9\xfd\x6a\x41\xff\xc4\x24\x26\x1f\xab\x2c\x1e\x06\xb3\x11\xa9\x93\xc1\xae\x8c\x10\x1a\xee\x84\x3c\x22\x43\x92\xc1\x5a\x2b\x39\xd7\x7c\x95\xf9\xf0\x38\xfe\xfe\x7c\x6b\xa0\x18\x46\xa1\xaf\x58\x9b\xba\x83\xd8\x28\x29\x36\x63\xc3\x53\xe8\x04\xe4\x84\x04\x27\xe4\x68\x56\x34\x86\x0e\xa7\x7b\x0b\xd0\x15\x6a\x0f\xc1\x6f\x4a\xfe\x2f\x66\xd8\x17\xef\x40\x83\x10\x76\x05\x3c\xc9\xf7\x5d\xcc\x87\x9e\x76\x57\x77\x89\xbc\x47\xb1\x1f\x92\xcf\x3d\xf2\xdf\x98\xd6\x07\x3c\x6d\xb3\x91\xf4\x6f\x6d\x6b\xf7\xc6\x5c\x71\xdd\x91\xc2\x07\xdc\x45\xcf\x00\xd3\x49\xd6\x67\x7b\x24\x7a\x18\x36\xe4\x35\x8c\x56\xc4\x65\x51\xda\xaa\x41\x51\xd7\xa0\x28\x29\x04\x4b\x20\x53\x02\x4b\x79\x4c\xaf\x5f\x20\x41\x89\x08\xc3\x26\x9d\x63\xdf\x49\x83\x20\x18\x98\x74\xa4\x3f\x6b\x8e\x9b\x36\xaa\xd4\x64\xc5\xed\x39\xc9\x41\x27\xa5\x33\x4f\x94\x26\x66\x2d\x9b\xd3\xc4\xfd\x61\xda\x19\x83\xea\x20\xc1\xa0\x9f\x2c\x03\x05\x0e\x56\x46\x37\x3a\x74\x59\x1c\x76\xdb\xed\x9c\xbb\xbe\x84\xed\xd6\x3b\x8f\x3d\xaf\x60\x72\x3a\x7b\xe6\x36\xc9\x88\x7b\x8d\xed\xcd\xad\xb4\x46\xfb\xf9\x7b\x88\x43\x59\x08\xc5\xd2\xd3\x58\xb8\xa6\x3d\xaf\x0e\x74\x38\x7c\xaa\x17\x8e\x9a\x6f\xb3\xab\xbb\x64\x21\xc7\x30\xa1\xe4\x35\x25\x1c\x66\x82\xce\x96\xb7\x17\xe8\x90\x17\x42\xad\x54\x69\x4f\xea\x30\xf0\xc2\xed\xdc\xaa\x39\x2b\x8a\x8e\x13\xb7\x1e\x60\xe0\x44\xeb\x43\xe7\xa9\xc9\x5b\xb5\x06\x2d\xd8\x86\x4e\x77\xef\xaa\x51\xc2\x4d\x0e\x67\xfd\xb4\x6f\x8a\x73\x73\xd4\x2a\x25\x16\x4c\xd7\x74\x3b\x85\xfa\x90\x7b\x0b\x96\x3c\x9d\xd0\xde\xab\x6a\xe6\x36\xef\xef\xe8\x6d\xe9\xf1\x4e\xd7\xd7\x4f\x60\x2d\x84\x74\x2c\xcb\x7c\x01\xc8\x69\xd2\x17\xa1\x79\x1f\xec\xae\x78\x07\x31\xea\x4d\x0b\xc7\xa2\xb9\x47\xca\x5e\x74\xa3\x9c\xf1\xca\x66\x0f\xa8\x1e\xa9\x11\xe8\x8a\xe1\xc4\xdd\x8c\x7b\x0d\x79\xab\x9e\x40\xd2\x69\xa7\x18\x3e\xb8\x15\xe2\x86\xf5\xc6\x89\x28\xac\xa0\xdd\xe3\x52\x29\x5b\x4f\x76\x33\xd0\x6b\xac\x7d\x78\x7f\x32\x8f\xc9\xaa\x21\x56\x2a\x37\xae\x80\x26\x52\x61\x51\x06\xad\x51\x92\xc1\x7c\x9e\xb0\x34\xdd\x18\x77\x5c\xbb\x09\x9a\x4e\x2f\xdd\x42\x53\x12\xb1\x32\x7c\x25\x1e\x56\x9a\xac\x5c\xf8\x61\x3c\x63\x49\xca\x99\xa9\x4c\x8c\x3b\x33\x32\x9d\x76\x8b\xb2\xb3\x15\xd4\x5a\x1d\xac\xe9\x9f\x11\x16\xeb\xdd\x52\xb0\xb5\xab\x67\x6a\x59\xc5\xe1\x7b\xf3\x72\x46\x3d\x9f\x6e\xa7\x88\xc2\x46\x69\xf7\xe3\xdd\x78\x4c\x66\x97\xf7\x37\x77\x0f\x33\x32\x1e\xfb\x98\x98\x44\xf3\xc2\x12\xa3\x93\x8e\xae\xa9\x7c\xc4\xc9\x5f\xa8\x32\x45\xd2\x1a\xbc\x65\xf6\xc8\x5e\x42\xc1\x17\x26\xc4\x6a\x1e\xbe\x0f\x3e\x04\xbf\xb8\xa7\xe0\xd1\xb8\x8b\x57\xc1\xbc\x41\xfc\xca\xef\x8e\x47\x83\x74\x75\xfe\x01\xad\x7f\x67\x58\xac\x31\x82\x27\xcc\x5d\x86\x37\xd0\xc7\x62\x77\xaa\xd9\x0c\x4f\x9d\x64\xaf\xf7\xc1\x53\x7d\xe8\x60\xb5\xf2\x1f\xbc\xff\x07\x00\x00\xff\xff\x1c\x88\x0b\xb8\x08\x0f\x00\x00")
|
||||
|
||||
func templatesBaseTmplBytes() ([]byte, error) {
|
||||
return bindataRead(
|
||||
@@ -172,7 +172,7 @@ func templatesBaseTmpl() (*asset, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "templates/base.tmpl", size: 3801, mode: os.FileMode(438), modTime: time.Unix(1467383708, 0)}
|
||||
info := bindataFileInfo{name: "templates/base.tmpl", size: 3848, mode: os.FileMode(438), modTime: time.Unix(1467736426, 0)}
|
||||
a := &asset{bytes: bytes, info: info}
|
||||
return a, nil
|
||||
}
|
||||
@@ -237,7 +237,7 @@ func templatesListingTmpl() (*asset, error) {
|
||||
return a, nil
|
||||
}
|
||||
|
||||
var _templatesMinimalTmpl = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xaa\xae\x56\x28\x49\xcd\x2d\xc8\x49\x2c\x49\x55\x50\x4a\xce\xcf\x2b\x49\xcd\x2b\x51\x52\xd0\x73\x49\x2c\x49\x54\xa8\xad\xe5\xe5\x02\x04\x00\x00\xff\xff\xb5\x2d\xa0\x4a\x20\x00\x00\x00")
|
||||
var _templatesMinimalTmpl = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xaa\xae\x56\x28\x49\xcd\x2d\xc8\x49\x2c\x49\x55\x50\x4a\xce\xcf\x2b\x49\xcd\x2b\x51\x52\xd0\x73\x49\x2c\x49\x54\xa8\xad\xe5\xe5\xb2\x29\x2e\x48\xcc\x53\xc8\x4c\xb1\x55\x2a\xc9\xcf\x4e\xcd\x53\xb2\x03\x6a\xd0\x73\xce\xcf\x4b\xcb\x4c\xd7\x0b\x01\x89\x00\x55\xd9\xe8\x83\x14\xd9\xf1\x72\x01\x02\x00\x00\xff\xff\xb7\x02\xfa\x70\x4d\x00\x00\x00")
|
||||
|
||||
func templatesMinimalTmplBytes() ([]byte, error) {
|
||||
return bindataRead(
|
||||
@@ -252,7 +252,7 @@ func templatesMinimalTmpl() (*asset, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "templates/minimal.tmpl", size: 32, mode: os.FileMode(438), modTime: time.Unix(1467321928, 0)}
|
||||
info := bindataFileInfo{name: "templates/minimal.tmpl", size: 77, mode: os.FileMode(438), modTime: time.Unix(1467736433, 0)}
|
||||
a := &asset{bytes: bytes, info: info}
|
||||
return a, nil
|
||||
}
|
||||
|
||||
@@ -420,6 +420,10 @@ pre {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
#token {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
/* MATERIAL ICONS */
|
||||
|
||||
@@ -1103,4 +1107,4 @@ i.spin {
|
||||
column-count: 1;
|
||||
column-gap: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
const tempID = "_fm_internal_temporary_id"
|
||||
var selectedItems = [];
|
||||
var token = "";
|
||||
|
||||
/* * * * * * * * * * * * * * * *
|
||||
* *
|
||||
@@ -115,6 +116,7 @@ var deleteEvent = function(event) {
|
||||
let request = new XMLHttpRequest();
|
||||
|
||||
request.open('DELETE', link);
|
||||
request.setRequestHeader('Token', token);
|
||||
request.send();
|
||||
request.onreadystatechange = function() {
|
||||
if (request.readyState == 4) {
|
||||
@@ -165,6 +167,11 @@ var RemoveLastDirectoryPartOf = function(url) {
|
||||
return (arr.join('/'));
|
||||
}
|
||||
|
||||
// Get the current token
|
||||
var updateToken = function() {
|
||||
token = document.getElementById("token").innerHTML;
|
||||
}
|
||||
|
||||
/* * * * * * * * * * * * * * * *
|
||||
* *
|
||||
* LISTING SPECIFIC FUNCTIONS *
|
||||
@@ -175,6 +182,7 @@ var reloadListing = function() {
|
||||
let request = new XMLHttpRequest();
|
||||
request.open('GET', window.location);
|
||||
request.setRequestHeader('Minimal', 'true');
|
||||
request.setRequestHeader('Token', token);
|
||||
request.send();
|
||||
request.onreadystatechange = function() {
|
||||
if (request.readyState == 4) {
|
||||
@@ -186,6 +194,7 @@ var reloadListing = function() {
|
||||
}
|
||||
}
|
||||
}
|
||||
updateToken();
|
||||
}
|
||||
|
||||
// Rename file event
|
||||
@@ -217,6 +226,7 @@ var renameEvent = function(event) {
|
||||
let request = new XMLHttpRequest();
|
||||
request.open('PATCH', link);
|
||||
request.setRequestHeader('Rename-To', newName);
|
||||
request.setRequestHeader('Token', token);
|
||||
request.send();
|
||||
request.onreadystatechange = function() {
|
||||
if (request.readyState == 4) {
|
||||
@@ -274,6 +284,7 @@ var handleFiles = function(files) {
|
||||
let request = new XMLHttpRequest();
|
||||
request.open('POST', window.location.pathname);
|
||||
request.setRequestHeader("Upload", "true");
|
||||
request.setRequestHeader('Token', token);
|
||||
request.send(data);
|
||||
request.onreadystatechange = function() {
|
||||
if (request.readyState == 4) {
|
||||
@@ -382,6 +393,7 @@ var newDirEvent = function(event) {
|
||||
let html = button.changeToLoading();
|
||||
let request = new XMLHttpRequest();
|
||||
request.open("POST", window.location);
|
||||
request.setRequestHeader('Token', token);
|
||||
request.setRequestHeader('Filename', document.getElementById('newdir').value);
|
||||
request.send();
|
||||
request.onreadystatechange = function() {
|
||||
@@ -444,6 +456,7 @@ var searchEvent = function(event) {
|
||||
let request = new XMLHttpRequest();
|
||||
request.open('POST', window.location);
|
||||
request.setRequestHeader('Command', value);
|
||||
request.setRequestHeader('Token', token);
|
||||
request.send();
|
||||
request.onreadystatechange = function() {
|
||||
if (request.readyState == 4) {
|
||||
@@ -751,6 +764,7 @@ document.addEventListener("editor", (event) => {
|
||||
let request = new XMLHttpRequest();
|
||||
request.open("PUT", window.location);
|
||||
request.setRequestHeader('Kind', kind);
|
||||
request.setRequestHeader('Token', token);
|
||||
request.send(JSON.stringify(data));
|
||||
request.onreadystatechange = function() {
|
||||
if (request.readyState == 4) {
|
||||
@@ -781,6 +795,9 @@ document.addEventListener("DOMContentLoaded", function(event) {
|
||||
}
|
||||
});
|
||||
|
||||
// Updates the token
|
||||
updateToken();
|
||||
|
||||
// Enables open, delete and download buttons
|
||||
document.getElementById("open").addEventListener("click", openEvent);
|
||||
document.getElementById("delete").addEventListener("click", deleteEvent);
|
||||
|
||||
@@ -104,6 +104,7 @@
|
||||
|
||||
<main>
|
||||
{{ template "content" .Data }}
|
||||
<span id="token">{{ .Config.Token }}</span>
|
||||
</main>
|
||||
|
||||
<footer>
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
{{ template "content" .Data }}
|
||||
<span id="token">{{ .Config.Token }}</span>
|
||||
@@ -17,6 +17,7 @@ type Config struct {
|
||||
BaseURL string
|
||||
AbsoluteURL string
|
||||
AddrPath string
|
||||
Token string // Anti CSRF token
|
||||
StyleSheet string // Costum stylesheet
|
||||
FrontMatter string // Default frontmatter to save files in
|
||||
HugoEnabled bool // Enables the Hugo plugin for File Manager
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"math/rand"
|
||||
"net/http"
|
||||
"time"
|
||||
)
|
||||
|
||||
const letterBytes = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"
|
||||
const (
|
||||
letterIdxBits = 6 // 6 bits to represent a letter index
|
||||
letterIdxMask = 1<<letterIdxBits - 1 // All 1-bits, as many as letterIdxBits
|
||||
letterIdxMax = 63 / letterIdxBits // # of letter indices fitting in 63 bits
|
||||
)
|
||||
|
||||
// CheckToken checs if current token is the same as the one used in the request
|
||||
func (c Config) CheckToken(r *http.Request) bool {
|
||||
token := r.Header.Get("Token")
|
||||
return c.Token == token
|
||||
}
|
||||
|
||||
// GenerateToken geneerates a new token
|
||||
func (c *Config) GenerateToken() {
|
||||
n := rand.Intn(80)
|
||||
src := rand.NewSource(time.Now().UnixNano())
|
||||
b := make([]byte, n)
|
||||
// A src.Int63() generates 63 random bits, enough for letterIdxMax characters!
|
||||
// future reference: http://stackoverflow.com/questions/22892120/how-to-generate-a-random-string-of-a-fixed-length-in-golang
|
||||
for i, cache, remain := n-1, src.Int63(), letterIdxMax; i >= 0; {
|
||||
if remain == 0 {
|
||||
cache, remain = src.Int63(), letterIdxMax
|
||||
}
|
||||
if idx := int(cache & letterIdxMask); idx < len(letterBytes) {
|
||||
b[i] = letterBytes[idx]
|
||||
i--
|
||||
}
|
||||
cache >>= letterIdxBits
|
||||
remain--
|
||||
}
|
||||
|
||||
c.Token = string(b)
|
||||
}
|
||||
@@ -8,6 +8,7 @@
|
||||
package filemanager
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
@@ -59,6 +60,13 @@ func (f FileManager) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, err
|
||||
}
|
||||
}
|
||||
|
||||
// Secure agains CSRF attacks
|
||||
if r.Method != http.MethodGet {
|
||||
if !c.CheckToken(r) {
|
||||
return http.StatusForbidden, nil
|
||||
}
|
||||
}
|
||||
|
||||
// Route the request depending on the HTTP Method
|
||||
switch r.Method {
|
||||
case http.MethodGet:
|
||||
@@ -67,6 +75,9 @@ func (f FileManager) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, err
|
||||
return assets.Serve(w, r, c)
|
||||
}
|
||||
|
||||
c.GenerateToken()
|
||||
fmt.Println(c.Token)
|
||||
|
||||
if !fi.IsDir {
|
||||
query := r.URL.Query()
|
||||
if val, ok := query["raw"]; ok && val[0] == "true" {
|
||||
|
||||
Reference in new issue
Block a user