Permalink
Browse files

Codeignitor 3.1.6 and corresponding changes

- fixes missing () from num_rows in authenticate user function
- removes passwordhash library in favor of built in PHP password_hash
  and password_verify functions
- uppercase all class filenames
- add new CLI error templates, move HTML error templates
- update mimes file to latest version
- update routes to latest version
  • Loading branch information...
wvolz committed Nov 7, 2017
1 parent 39f4e83 commit e384826aea00558b7982d94ef75a2bf5949a8fcd
Showing with 44,591 additions and 23,170 deletions.
  1. +175 −104 application/config/mimes.php
  2. +16 −5 application/config/routes.php
  3. 0 application/controllers/{adif.php → Adif.php}
  4. 0 application/controllers/{api.php → Api.php}
  5. 0 application/controllers/{awards.php → Awards.php}
  6. 0 application/controllers/{backup.php → Backup.php}
  7. 0 application/controllers/{dashboard.php → Dashboard.php}
  8. 0 application/controllers/{dxcluster.php → Dxcluster.php}
  9. 0 application/controllers/{eqsl.php → Eqsl.php}
  10. 0 application/controllers/{export.php → Export.php}
  11. 0 application/controllers/{install.php → Install.php}
  12. 0 application/controllers/{kml.php → Kml.php}
  13. 0 application/controllers/{logbook.php → Logbook.php}
  14. 0 application/controllers/{lotw.php → Lotw.php}
  15. 0 application/controllers/{migrate.php → Migrate.php}
  16. 0 application/controllers/{notes.php → Notes.php}
  17. 0 application/controllers/{qsl.php → Qsl.php}
  18. 0 application/controllers/{qso.php → Qso.php}
  19. 0 application/controllers/{radio.php → Radio.php}
  20. 0 application/controllers/{search.php → Search.php}
  21. 0 application/controllers/{setup.php → Setup.php}
  22. 0 application/controllers/{social.php → Social.php}
  23. 0 application/controllers/{statistics.php → Statistics.php}
  24. 0 application/controllers/{update.php → Update.php}
  25. 0 application/controllers/{user.php → User.php}
  26. 0 application/controllers/{widgets.php → Widgets.php}
  27. 0 application/libraries/{adif_parser.php → Adif_parser.php}
  28. 0 application/libraries/{hamqth.php → Hamqth.php}
  29. 0 application/libraries/{qrz.php → Qrz.php}
  30. 0 application/models/{adif_data.php → Adif_data.php}
  31. 0 application/models/{api_model.php → Api_model.php}
  32. 0 application/models/{cat.php → Cat.php}
  33. 0 application/models/{dxcc.php → Dxcc.php}
  34. 0 application/models/{dxcc_entities.php → Dxcc_entities.php}
  35. 0 application/models/{dxcc_exceptions.php → Dxcc_exceptions.php}
  36. 0 application/models/{dxcc_prefixes.php → Dxcc_prefixes.php}
  37. 0 application/models/{logbook_model.php → Logbook_model.php}
  38. 0 application/models/{lotw.php → Lotw.php}
  39. 0 application/models/{note.php → Note.php}
  40. 0 application/models/{search.php → Search.php}
  41. 0 application/models/{sota.php → Sota.php}
  42. 0 application/models/{stats.php → Stats.php}
  43. +7 −9 application/models/{user_model.php → User_model.php}
  44. 0 application/models/{wab.php → Wab.php}
  45. 0 application/models/{wacral.php → Wacral.php}
  46. +0 −253 application/third_party/PasswordHash.php
  47. +8 −0 application/views/errors/cli/error_404.php
  48. +8 −0 application/views/errors/cli/error_db.php
  49. +21 −0 application/views/errors/cli/error_exception.php
  50. +8 −0 application/views/errors/cli/error_general.php
  51. +21 −0 application/views/errors/cli/error_php.php
  52. +11 −0 application/views/errors/cli/index.html
  53. 0 application/{errors → views/errors/html}/error_404.php
  54. 0 application/{errors → views/errors/html}/error_db.php
  55. +32 −0 application/views/errors/html/error_exception.php
  56. 0 application/{errors → views/errors/html}/error_general.php
  57. 0 application/{errors → views/errors/html}/error_php.php
  58. 0 application/{errors → views/errors/html}/index.html
  59. +11 −0 application/views/errors/index.html
  60. +176 −72 index.php
  61. +63 −43 system/core/Benchmark.php
  62. +333 −142 system/core/CodeIgniter.php
  63. +627 −289 system/core/Common.php
  64. +235 −177 system/core/Config.php
  65. +55 −26 system/core/Controller.php
  66. +182 −86 system/core/Exceptions.php
  67. +127 −86 system/core/Hooks.php
  68. +592 −381 system/core/Input.php
  69. +124 −61 system/core/Lang.php
  70. +806 −503 system/core/Loader.php
  71. +296 −0 system/core/Log.php
  72. +50 −26 system/core/Model.php
  73. +522 −189 system/core/Output.php
  74. +315 −259 system/core/Router.php
  75. +1,080 −0 system/core/Security.php
  76. +321 −290 system/core/URI.php
  77. +75 −76 system/core/Utf8.php
  78. +254 −0 system/core/compat/hash.php
  79. +11 −0 system/core/compat/index.html
  80. +149 −0 system/core/compat/mbstring.php
  81. +251 −0 system/core/compat/password.php
  82. +182 −0 system/core/compat/standard.php
  83. +2 −1 system/core/index.html
  84. +138 −85 system/database/DB.php
  85. +0 −2,073 system/database/DB_active_rec.php
  86. +95 −69 system/database/DB_cache.php
  87. +1,143 −546 system/database/DB_driver.php
  88. +800 −150 system/database/DB_forge.php
  89. +2,803 −0 system/database/DB_query_builder.php
  90. +434 −173 system/database/DB_result.php
  91. +193 −183 system/database/DB_utility.php
  92. +405 −0 system/database/drivers/cubrid/cubrid_driver.php
  93. +230 −0 system/database/drivers/cubrid/cubrid_forge.php
  94. +177 −0 system/database/drivers/cubrid/cubrid_result.php
  95. +79 −0 system/database/drivers/cubrid/cubrid_utility.php
  96. +11 −0 system/database/drivers/cubrid/index.html
  97. +413 −0 system/database/drivers/ibase/ibase_driver.php
  98. +251 −0 system/database/drivers/ibase/ibase_forge.php
  99. +161 −0 system/database/drivers/ibase/ibase_result.php
  100. +69 −0 system/database/drivers/ibase/ibase_utility.php
  101. +11 −0 system/database/drivers/ibase/index.html
  102. +2 −1 system/database/drivers/index.html
  103. +2 −1 system/database/drivers/mssql/index.html
  104. +264 −410 system/database/drivers/mssql/mssql_driver.php
  105. +88 −185 system/database/drivers/mssql/mssql_forge.php
  106. +79 −50 system/database/drivers/mssql/mssql_result.php
  107. +47 −58 system/database/drivers/mssql/mssql_utility.php
  108. +2 −1 system/database/drivers/mysql/index.html
  109. +229 −497 system/database/drivers/mysql/mysql_driver.php
  110. +153 −179 system/database/drivers/mysql/mysql_forge.php
  111. +80 −50 system/database/drivers/mysql/mysql_result.php
  112. +79 −78 system/database/drivers/mysql/mysql_utility.php
  113. +2 −1 system/database/drivers/mysqli/index.html
  114. +285 −481 system/database/drivers/mysqli/mysqli_driver.php
  115. +154 −164 system/database/drivers/mysqli/mysqli_forge.php
  116. +124 −53 system/database/drivers/mysqli/mysqli_result.php
  117. +180 −52 system/database/drivers/mysqli/mysqli_utility.php
  118. +2 −1 system/database/drivers/oci8/index.html
  119. +364 −453 system/database/drivers/oci8/oci8_driver.php
  120. +118 −179 system/database/drivers/oci8/oci8_forge.php
  121. +114 −134 system/database/drivers/oci8/oci8_result.php
  122. +42 −61 system/database/drivers/oci8/oci8_utility.php
  123. +2 −1 system/database/drivers/odbc/index.html
  124. +202 −413 system/database/drivers/odbc/odbc_driver.php
  125. +51 −231 system/database/drivers/odbc/odbc_forge.php
  126. +141 −101 system/database/drivers/odbc/odbc_result.php
  127. +40 −80 system/database/drivers/odbc/odbc_utility.php
  128. +11 −0 system/database/drivers/pdo/index.html
  129. +329 −0 system/database/drivers/pdo/pdo_driver.php
  130. +65 −0 system/database/drivers/pdo/pdo_forge.php
  131. +198 −0 system/database/drivers/pdo/pdo_result.php
  132. +63 −0 system/database/drivers/pdo/pdo_utility.php
  133. +11 −0 system/database/drivers/pdo/subdrivers/index.html
  134. +200 −0 system/database/drivers/pdo/subdrivers/pdo_4d_driver.php
  135. +217 −0 system/database/drivers/pdo/subdrivers/pdo_4d_forge.php
  136. +209 −0 system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php
  137. +230 −0 system/database/drivers/pdo/subdrivers/pdo_cubrid_forge.php
  138. +353 −0 system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php
  139. +149 −0 system/database/drivers/pdo/subdrivers/pdo_dblib_forge.php
  140. +279 −0 system/database/drivers/pdo/subdrivers/pdo_firebird_driver.php
  141. +237 −0 system/database/drivers/pdo/subdrivers/pdo_firebird_forge.php
  142. +244 −0 system/database/drivers/pdo/subdrivers/pdo_ibm_driver.php
  143. +154 −0 system/database/drivers/pdo/subdrivers/pdo_ibm_forge.php
  144. +309 −0 system/database/drivers/pdo/subdrivers/pdo_informix_driver.php
  145. +163 −0 system/database/drivers/pdo/subdrivers/pdo_informix_forge.php
  146. +374 −0 system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php
  147. +256 −0 system/database/drivers/pdo/subdrivers/pdo_mysql_forge.php
  148. +326 −0 system/database/drivers/pdo/subdrivers/pdo_oci_driver.php
  149. +176 −0 system/database/drivers/pdo/subdrivers/pdo_oci_forge.php
  150. +229 −0 system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php
  151. +70 −0 system/database/drivers/pdo/subdrivers/pdo_odbc_forge.php
  152. +384 −0 system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php
  153. +210 −0 system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php
  154. +219 −0 system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php
  155. +238 −0 system/database/drivers/pdo/subdrivers/pdo_sqlite_forge.php
  156. +369 −0 system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php
  157. +149 −0 system/database/drivers/pdo/subdrivers/pdo_sqlsrv_forge.php
  158. +2 −1 system/database/drivers/postgre/index.html
  159. +326 −390 system/database/drivers/postgre/postgre_driver.php
  160. +130 −224 system/database/drivers/postgre/postgre_forge.php
  161. +63 −50 system/database/drivers/postgre/postgre_result.php
  162. +46 −56 system/database/drivers/postgre/postgre_utility.php
  163. +2 −1 system/database/drivers/sqlite/index.html
  164. +123 −450 system/database/drivers/sqlite/sqlite_driver.php
  165. +127 −187 system/database/drivers/sqlite/sqlite_forge.php
  166. +59 −74 system/database/drivers/sqlite/sqlite_result.php
  167. +39 −74 system/database/drivers/sqlite/sqlite_utility.php
  168. +11 −0 system/database/drivers/sqlite3/index.html
  169. +350 −0 system/database/drivers/sqlite3/sqlite3_driver.php
  170. +225 −0 system/database/drivers/sqlite3/sqlite3_forge.php
  171. +194 −0 system/database/drivers/sqlite3/sqlite3_result.php
  172. +61 −0 system/database/drivers/sqlite3/sqlite3_utility.php
  173. +11 −0 system/database/drivers/sqlsrv/index.html
  174. +543 −0 system/database/drivers/sqlsrv/sqlsrv_driver.php
  175. +149 −0 system/database/drivers/sqlsrv/sqlsrv_forge.php
  176. +193 −0 system/database/drivers/sqlsrv/sqlsrv_result.php
  177. +77 −0 system/database/drivers/sqlsrv/sqlsrv_utility.php
  178. +2 −1 system/database/index.html
  179. +2 −1 system/fonts/index.html
  180. BIN system/fonts/texb.ttf
  181. +70 −74 system/helpers/array_helper.php
  182. +223 −128 system/helpers/captcha_helper.php
  183. +73 −63 system/helpers/cookie_helper.php
  184. +451 −320 system/helpers/date_helper.php
  185. +52 −31 system/helpers/directory_helper.php
  186. +115 −57 system/helpers/download_helper.php
  187. +53 −31 system/helpers/email_helper.php
  188. +204 −221 system/helpers/file_helper.php
  189. +554 −551 system/helpers/form_helper.php
  190. +189 −201 system/helpers/html_helper.php
  191. +2 −1 system/helpers/index.html
  192. +201 −107 system/helpers/inflector_helper.php
  193. +48 −31 system/helpers/language_helper.php
  194. +41 −23 system/helpers/number_helper.php
  195. +49 −39 system/helpers/path_helper.php
  196. +76 −99 system/helpers/security_helper.php
  197. +136 −160 system/helpers/smiley_helper.php
  198. +188 −174 system/helpers/string_helper.php
  199. +268 −234 system/helpers/text_helper.php
  200. +60 −50 system/helpers/typography_helper.php
  201. +293 −319 system/helpers/url_helper.php
  202. +50 −31 system/helpers/xml_helper.php
  203. +2 −1 system/index.html
  204. +82 −49 system/language/english/calendar_lang.php
  205. +55 −22 system/language/english/date_lang.php
  206. +39 −5 system/language/english/db_lang.php
  207. +56 −22 system/language/english/email_lang.php
  208. +66 −23 system/language/english/form_validation_lang.php
  209. +49 −16 system/language/english/ftp_lang.php
  210. +55 −22 system/language/english/imglib_lang.php
  211. +2 −1 system/language/english/index.html
  212. +45 −11 system/language/english/migration_lang.php
  213. +42 −8 system/language/english/number_lang.php
  214. +43 −0 system/language/english/pagination_lang.php
  215. +57 −19 system/language/english/profiler_lang.php
  216. +56 −23 system/language/english/unit_test_lang.php
  217. +53 −20 system/language/english/upload_lang.php
  218. +2 −1 system/language/index.html
  219. +154 −115 system/libraries/Cache/Cache.php
  220. +128 −62 system/libraries/Cache/drivers/Cache_apc.php
  221. +86 −43 system/libraries/Cache/drivers/Cache_dummy.php
  222. +167 −77 system/libraries/Cache/drivers/Cache_file.php
  223. +199 −105 system/libraries/Cache/drivers/Cache_memcached.php
  224. +328 −0 system/libraries/Cache/drivers/Cache_redis.php
  225. +217 −0 system/libraries/Cache/drivers/Cache_wincache.php
  226. +11 −0 system/libraries/Cache/drivers/index.html
  227. +11 −0 system/libraries/Cache/index.html
  228. +271 −200 system/libraries/Calendar.php
  229. +200 −183 system/libraries/Cart.php
  230. +189 −76 system/libraries/Driver.php
  231. +1,259 −855 system/libraries/Email.php
  232. +175 −201 system/libraries/Encrypt.php
  233. +943 −0 system/libraries/Encryption.php
  234. +754 −535 system/libraries/Form_validation.php
  235. +209 −202 system/libraries/Ftp.php
  236. +904 −602 system/libraries/Image_lib.php
  237. +135 −150 system/libraries/Javascript.php
  238. +316 −311 system/libraries/{javascript → Javascript}/Jquery.php
  239. +11 −0 system/libraries/Javascript/index.html
  240. +0 −114 system/libraries/Log.php
  241. +276 −127 system/libraries/Migration.php
  242. +563 −141 system/libraries/Pagination.php
  243. +125 −89 system/libraries/Parser.php
  244. +281 −209 system/libraries/Profiler.php
  245. +0 −738 system/libraries/Security.php
  246. +0 −776 system/libraries/Session.php
  247. +985 −0 system/libraries/Session/Session.php
  248. +59 −0 system/libraries/Session/SessionHandlerInterface.php
  249. +191 −0 system/libraries/Session/Session_driver.php
  250. +420 −0 system/libraries/Session/drivers/Session_database_driver.php
  251. +406 −0 system/libraries/Session/drivers/Session_files_driver.php
  252. +376 −0 system/libraries/Session/drivers/Session_memcached_driver.php
  253. +399 −0 system/libraries/Session/drivers/Session_redis_driver.php
  254. +11 −0 system/libraries/Session/drivers/index.html
  255. +11 −0 system/libraries/Session/index.html
  256. +0 −251 system/libraries/Sha1.php
  257. +218 −211 system/libraries/Table.php
  258. +166 −158 system/libraries/Trackback.php
  259. +122 −108 system/libraries/Typography.php
  260. +164 −141 system/libraries/Unit_test.php
  261. +711 −392 system/libraries/Upload.php
  262. +244 −104 system/libraries/User_agent.php
  263. +1,099 −612 system/libraries/Xmlrpc.php
  264. +189 −176 system/libraries/Xmlrpcs.php
  265. +245 −136 system/libraries/Zip.php
  266. +2 −1 system/libraries/index.html
@@ -1,4 +1,6 @@
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| MIME TYPES
@@ -7,106 +9,175 @@
| Upload class to help identify allowed file types.
|
*/
$mimes = array( 'hqx' => 'application/mac-binhex40',
'cpt' => 'application/mac-compactpro',
'csv' => array('text/x-comma-separated-values', 'text/comma-separated-values', 'application/octet-stream', 'application/vnd.ms-excel', 'text/x-csv', 'text/csv', 'application/csv', 'application/excel', 'application/vnd.msexcel'),
'bin' => 'application/macbinary',
'dms' => 'application/octet-stream',
'lha' => 'application/octet-stream',
'lzh' => 'application/octet-stream',
'exe' => array('application/octet-stream', 'application/x-msdownload'),
'class' => 'application/octet-stream',
'psd' => 'application/x-photoshop',
'so' => 'application/octet-stream',
'sea' => 'application/octet-stream',
'dll' => 'application/octet-stream',
'oda' => 'application/oda',
'pdf' => array('application/pdf', 'application/x-download'),
'ai' => 'application/postscript',
'eps' => 'application/postscript',
'ps' => 'application/postscript',
'smi' => 'application/smil',
'smil' => 'application/smil',
'mif' => 'application/vnd.mif',
'xls' => array('application/excel', 'application/vnd.ms-excel', 'application/msexcel'),
'ppt' => array('application/powerpoint', 'application/vnd.ms-powerpoint'),
'wbxml' => 'application/wbxml',
'wmlc' => 'application/wmlc',
'dcr' => 'application/x-director',
'dir' => 'application/x-director',
'dxr' => 'application/x-director',
'dvi' => 'application/x-dvi',
'gtar' => 'application/x-gtar',
'gz' => 'application/x-gzip',
'php' => 'application/x-httpd-php',
'php4' => 'application/x-httpd-php',
'php3' => 'application/x-httpd-php',
'phtml' => 'application/x-httpd-php',
'phps' => 'application/x-httpd-php-source',
'js' => 'application/x-javascript',
'swf' => 'application/x-shockwave-flash',
'sit' => 'application/x-stuffit',
'tar' => 'application/x-tar',
'tgz' => array('application/x-tar', 'application/x-gzip-compressed'),
'xhtml' => 'application/xhtml+xml',
'xht' => 'application/xhtml+xml',
'zip' => array('application/x-zip', 'application/zip', 'application/x-zip-compressed'),
'mid' => 'audio/midi',
'midi' => 'audio/midi',
'mpga' => 'audio/mpeg',
'mp2' => 'audio/mpeg',
'mp3' => array('audio/mpeg', 'audio/mpg', 'audio/mpeg3', 'audio/mp3'),
'aif' => 'audio/x-aiff',
'aiff' => 'audio/x-aiff',
'aifc' => 'audio/x-aiff',
'ram' => 'audio/x-pn-realaudio',
'rm' => 'audio/x-pn-realaudio',
'rpm' => 'audio/x-pn-realaudio-plugin',
'ra' => 'audio/x-realaudio',
'rv' => 'video/vnd.rn-realvideo',
'wav' => 'audio/x-wav',
'bmp' => 'image/bmp',
'gif' => 'image/gif',
'jpeg' => array('image/jpeg', 'image/pjpeg'),
'jpg' => array('image/jpeg', 'image/pjpeg'),
'jpe' => array('image/jpeg', 'image/pjpeg'),
'png' => array('image/png', 'image/x-png'),
'tiff' => 'image/tiff',
'tif' => 'image/tiff',
'css' => 'text/css',
'html' => 'text/html',
'htm' => 'text/html',
'shtml' => 'text/html',
'txt' => 'text/plain',
'text' => 'text/plain',
'log' => array('text/plain', 'text/x-log'),
'rtx' => 'text/richtext',
'rtf' => 'text/rtf',
'xml' => 'text/xml',
'xsl' => 'text/xml',
'mpeg' => 'video/mpeg',
'mpg' => 'video/mpeg',
'mpe' => 'video/mpeg',
'qt' => 'video/quicktime',
'mov' => 'video/quicktime',
'avi' => 'video/x-msvideo',
'movie' => 'video/x-sgi-movie',
'doc' => 'application/msword',
'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
'word' => array('application/msword', 'application/octet-stream'),
'xl' => 'application/excel',
'eml' => 'message/rfc822',
'json' => array('application/json', 'text/json'),
'adi' => 'application/octet-stream',
'adif' => 'application/octet-stream',
'ADI' => 'application/octet-stream',
'ADIF' => 'application/octet-stream',
'tq8' => 'application/octet-stream',
'TQ8' => 'application/octet-stream',
);
/* End of file mimes.php */
/* Location: ./application/config/mimes.php */
return array(
'hqx' => array('application/mac-binhex40', 'application/mac-binhex', 'application/x-binhex40', 'application/x-mac-binhex40'),
'cpt' => 'application/mac-compactpro',
'csv' => array('text/x-comma-separated-values', 'text/comma-separated-values', 'application/octet-stream', 'application/vnd.ms-excel', 'application/x-csv', 'text/x-csv', 'text/csv', 'application/csv', 'application/excel', 'application/vnd.msexcel', 'text/plain'),
'bin' => array('application/macbinary', 'application/mac-binary', 'application/octet-stream', 'application/x-binary', 'application/x-macbinary'),
'dms' => 'application/octet-stream',
'lha' => 'application/octet-stream',
'lzh' => 'application/octet-stream',
'exe' => array('application/octet-stream', 'application/x-msdownload'),
'class' => 'application/octet-stream',
'psd' => array('application/x-photoshop', 'image/vnd.adobe.photoshop'),
'so' => 'application/octet-stream',
'sea' => 'application/octet-stream',
'dll' => 'application/octet-stream',
'oda' => 'application/oda',
'pdf' => array('application/pdf', 'application/force-download', 'application/x-download', 'binary/octet-stream'),
'ai' => array('application/pdf', 'application/postscript'),
'eps' => 'application/postscript',
'ps' => 'application/postscript',
'smi' => 'application/smil',
'smil' => 'application/smil',
'mif' => 'application/vnd.mif',
'xls' => array('application/vnd.ms-excel', 'application/msexcel', 'application/x-msexcel', 'application/x-ms-excel', 'application/x-excel', 'application/x-dos_ms_excel', 'application/xls', 'application/x-xls', 'application/excel', 'application/download', 'application/vnd.ms-office', 'application/msword'),
'ppt' => array('application/powerpoint', 'application/vnd.ms-powerpoint', 'application/vnd.ms-office', 'application/msword'),
'pptx' => array('application/vnd.openxmlformats-officedocument.presentationml.presentation', 'application/x-zip', 'application/zip'),
'wbxml' => 'application/wbxml',
'wmlc' => 'application/wmlc',
'dcr' => 'application/x-director',
'dir' => 'application/x-director',
'dxr' => 'application/x-director',
'dvi' => 'application/x-dvi',
'gtar' => 'application/x-gtar',
'gz' => 'application/x-gzip',
'gzip' => 'application/x-gzip',
'php' => array('application/x-httpd-php', 'application/php', 'application/x-php', 'text/php', 'text/x-php', 'application/x-httpd-php-source'),
'php4' => 'application/x-httpd-php',
'php3' => 'application/x-httpd-php',
'phtml' => 'application/x-httpd-php',
'phps' => 'application/x-httpd-php-source',
'js' => array('application/x-javascript', 'text/plain'),
'swf' => 'application/x-shockwave-flash',
'sit' => 'application/x-stuffit',
'tar' => 'application/x-tar',
'tgz' => array('application/x-tar', 'application/x-gzip-compressed'),
'z' => 'application/x-compress',
'xhtml' => 'application/xhtml+xml',
'xht' => 'application/xhtml+xml',
'zip' => array('application/x-zip', 'application/zip', 'application/x-zip-compressed', 'application/s-compressed', 'multipart/x-zip'),
'rar' => array('application/x-rar', 'application/rar', 'application/x-rar-compressed'),
'mid' => 'audio/midi',
'midi' => 'audio/midi',
'mpga' => 'audio/mpeg',
'mp2' => 'audio/mpeg',
'mp3' => array('audio/mpeg', 'audio/mpg', 'audio/mpeg3', 'audio/mp3'),
'aif' => array('audio/x-aiff', 'audio/aiff'),
'aiff' => array('audio/x-aiff', 'audio/aiff'),
'aifc' => 'audio/x-aiff',
'ram' => 'audio/x-pn-realaudio',
'rm' => 'audio/x-pn-realaudio',
'rpm' => 'audio/x-pn-realaudio-plugin',
'ra' => 'audio/x-realaudio',
'rv' => 'video/vnd.rn-realvideo',
'wav' => array('audio/x-wav', 'audio/wave', 'audio/wav'),
'bmp' => array('image/bmp', 'image/x-bmp', 'image/x-bitmap', 'image/x-xbitmap', 'image/x-win-bitmap', 'image/x-windows-bmp', 'image/ms-bmp', 'image/x-ms-bmp', 'application/bmp', 'application/x-bmp', 'application/x-win-bitmap'),
'gif' => 'image/gif',
'jpeg' => array('image/jpeg', 'image/pjpeg'),
'jpg' => array('image/jpeg', 'image/pjpeg'),
'jpe' => array('image/jpeg', 'image/pjpeg'),
'jp2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
'j2k' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
'jpf' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
'jpg2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
'jpx' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
'jpm' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
'mj2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
'mjp2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
'png' => array('image/png', 'image/x-png'),
'tiff' => 'image/tiff',
'tif' => 'image/tiff',
'css' => array('text/css', 'text/plain'),
'html' => array('text/html', 'text/plain'),
'htm' => array('text/html', 'text/plain'),
'shtml' => array('text/html', 'text/plain'),
'txt' => 'text/plain',
'text' => 'text/plain',
'log' => array('text/plain', 'text/x-log'),
'rtx' => 'text/richtext',
'rtf' => 'text/rtf',
'xml' => array('application/xml', 'text/xml', 'text/plain'),
'xsl' => array('application/xml', 'text/xsl', 'text/xml'),
'mpeg' => 'video/mpeg',
'mpg' => 'video/mpeg',
'mpe' => 'video/mpeg',
'qt' => 'video/quicktime',
'mov' => 'video/quicktime',
'avi' => array('video/x-msvideo', 'video/msvideo', 'video/avi', 'application/x-troff-msvideo'),
'movie' => 'video/x-sgi-movie',
'doc' => array('application/msword', 'application/vnd.ms-office'),
'docx' => array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip', 'application/msword', 'application/x-zip'),
'dot' => array('application/msword', 'application/vnd.ms-office'),
'dotx' => array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip', 'application/msword'),
'xlsx' => array('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/zip', 'application/vnd.ms-excel', 'application/msword', 'application/x-zip'),
'word' => array('application/msword', 'application/octet-stream'),
'xl' => 'application/excel',
'eml' => 'message/rfc822',
'json' => array('application/json', 'text/json'),
'pem' => array('application/x-x509-user-cert', 'application/x-pem-file', 'application/octet-stream'),
'p10' => array('application/x-pkcs10', 'application/pkcs10'),
'p12' => 'application/x-pkcs12',
'p7a' => 'application/x-pkcs7-signature',
'p7c' => array('application/pkcs7-mime', 'application/x-pkcs7-mime'),
'p7m' => array('application/pkcs7-mime', 'application/x-pkcs7-mime'),
'p7r' => 'application/x-pkcs7-certreqresp',
'p7s' => 'application/pkcs7-signature',
'crt' => array('application/x-x509-ca-cert', 'application/x-x509-user-cert', 'application/pkix-cert'),
'crl' => array('application/pkix-crl', 'application/pkcs-crl'),
'der' => 'application/x-x509-ca-cert',
'kdb' => 'application/octet-stream',
'pgp' => 'application/pgp',
'gpg' => 'application/gpg-keys',
'sst' => 'application/octet-stream',
'csr' => 'application/octet-stream',
'rsa' => 'application/x-pkcs7',
'cer' => array('application/pkix-cert', 'application/x-x509-ca-cert'),
'3g2' => 'video/3gpp2',
'3gp' => array('video/3gp', 'video/3gpp'),
'mp4' => 'video/mp4',
'm4a' => 'audio/x-m4a',
'f4v' => array('video/mp4', 'video/x-f4v'),
'flv' => 'video/x-flv',
'webm' => 'video/webm',
'aac' => 'audio/x-acc',
'm4u' => 'application/vnd.mpegurl',
'm3u' => 'text/plain',
'xspf' => 'application/xspf+xml',
'vlc' => 'application/videolan',
'wmv' => array('video/x-ms-wmv', 'video/x-ms-asf'),
'au' => 'audio/x-au',
'ac3' => 'audio/ac3',
'flac' => 'audio/x-flac',
'ogg' => array('audio/ogg', 'video/ogg', 'application/ogg'),
'kmz' => array('application/vnd.google-earth.kmz', 'application/zip', 'application/x-zip'),
'kml' => array('application/vnd.google-earth.kml+xml', 'application/xml', 'text/xml'),
'ics' => 'text/calendar',
'ical' => 'text/calendar',
'zsh' => 'text/x-scriptzsh',
'7zip' => array('application/x-compressed', 'application/x-zip-compressed', 'application/zip', 'multipart/x-zip'),
'cdr' => array('application/cdr', 'application/coreldraw', 'application/x-cdr', 'application/x-coreldraw', 'image/cdr', 'image/x-cdr', 'zz-application/zz-winassoc-cdr'),
'wma' => array('audio/x-ms-wma', 'video/x-ms-asf'),
'jar' => array('application/java-archive', 'application/x-java-application', 'application/x-jar', 'application/x-compressed'),
'svg' => array('image/svg+xml', 'application/xml', 'text/xml'),
'vcf' => 'text/x-vcard',
'srt' => array('text/srt', 'text/plain'),
'vtt' => array('text/vtt', 'text/plain'),
'ico' => array('image/x-icon', 'image/x-ico', 'image/vnd.microsoft.icon'),
'odc' => 'application/vnd.oasis.opendocument.chart',
'otc' => 'application/vnd.oasis.opendocument.chart-template',
'odf' => 'application/vnd.oasis.opendocument.formula',
'otf' => 'application/vnd.oasis.opendocument.formula-template',
'odg' => 'application/vnd.oasis.opendocument.graphics',
'otg' => 'application/vnd.oasis.opendocument.graphics-template',
'odi' => 'application/vnd.oasis.opendocument.image',
'oti' => 'application/vnd.oasis.opendocument.image-template',
'odp' => 'application/vnd.oasis.opendocument.presentation',
'otp' => 'application/vnd.oasis.opendocument.presentation-template',
'ods' => 'application/vnd.oasis.opendocument.spreadsheet',
'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template',
'odt' => 'application/vnd.oasis.opendocument.text',
'odm' => 'application/vnd.oasis.opendocument.text-master',
'ott' => 'application/vnd.oasis.opendocument.text-template',
'oth' => 'application/vnd.oasis.opendocument.text-web'
);
@@ -17,13 +17,13 @@
|
| Please see the user guide for complete details:
|
| http://codeigniter.com/user_guide/general/routing.html
| https://codeigniter.com/user_guide/general/routing.html
|
| -------------------------------------------------------------------------
| RESERVED ROUTES
| -------------------------------------------------------------------------
|
| There area two reserved routes:
| There are three reserved routes:
|
| $route['default_controller'] = 'welcome';
|
@@ -33,14 +33,25 @@
|
| $route['404_override'] = 'errors/page_missing';
|
| This route will tell the Router what URI segments to use if those provided
| in the URL cannot be matched to a valid route.
| This route will tell the Router which controller/method to use if those
| provided in the URL cannot be matched to a valid route.
|
| $route['translate_uri_dashes'] = FALSE;
|
| This is not exactly a route, but allows you to automatically route
| controller and method names that contain dashes. '-' isn't a valid
| class or method name character, so it requires translation.
| When you set this option to TRUE, it will replace ALL dashes in the
| controller and method URI segments.
|
| Examples: my-controller/index -> my_controller/index
| my-controller/my-method -> my_controller/my_method
*/
$route['default_controller'] = "dashboard";
$route['404_override'] = '';
$route['translate_uri_dashes'] = FALSE;
/* End of file routes.php */
/* Location: ./application/config/routes.php */
/* Location: ./application/config/routes.php */
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -8,7 +8,8 @@
// Uses 'phpass' from http://www.openwall.com/phpass/ to implement password hashing
require_once('application/third_party/PasswordHash.php');
// TODO migration away from this?
//require_once('application/third_party/PasswordHash.php');
class User_Model extends CI_Model {
@@ -188,7 +189,7 @@ function delete($user_id) {
// Validates a username/password combination
// This is really just a wrapper around User_Model::authenticate
function login() {
$username = $this->input->post('user_name');
$password = $this->input->post('user_password');
@@ -201,7 +202,7 @@ function login() {
// login session *will* be cleared, no matter what state it is in
function clear_session() {
$this->session->unset_userdata(array('user_id' => '', 'user_type' => '', 'user_email' => '', 'user_hash' => ''));
$this->session->sess_destroy();
}
// FUNCTION: void update_session()
@@ -253,7 +254,7 @@ function validate_session() {
// Authenticate a user against the users table
function authenticate($username, $password) {
$u = $this->get($username);
if($u->num_rows != 0)
if($u->num_rows() != 0)
{
if($this->_auth($password, $u->row()->user_password)) {
return 1;
@@ -310,8 +311,7 @@ function timezones() {
// FUNCTION: bool _auth($password, $hash)
// Checks a password against the stored hash
private function _auth($password, $hash) {
$h = new PasswordHash(8, FALSE);
if($h->CheckPassword($password, $hash)) {
if(password_verify($password, $hash)) {
return 1;
} else {
return 0;
@@ -323,9 +323,7 @@ private function _auth($password, $hash) {
// Will return '0' in the event of problems with the
// hashing function
private function _hash($password) {
$h = new PasswordHash(8, FALSE);
$hash = $h->HashPassword($password);
unset($h);
$hash = password_hash($password, PASSWORD_DEFAULT);
if(strlen($hash) < 20) {
return EPASSWORDINVALID;
File renamed without changes.
File renamed without changes.
Oops, something went wrong.

0 comments on commit e384826

Please sign in to comment.