Fixed bare except clause in cache loading that could hide critical errors
Added input validation to getpipeoutput() function to detect potential command injection attempts
Improved file handling with proper context managers and error handling
2. Error Handling Patterns ✅
Replaced bare except with specific exception types (zlib.error, pickle.PickleError, EOFError, etc.)
Added proper error messages with context information
Fixed division by zero in execution time calculation
Added main-level exception handling with debug mode support
3. Undefined Variables/Functions ✅
Verified all function calls are properly defined
Fixed potential runtime errors in mathematical operations
Added safe division operations where needed
4. JavaScript Code Style Issues ✅
Fixed undeclared variables in sortable.js by adding proper var declarations
Fixed variable shadowing in compare_numeric() function
Improved loop variable declarations in sortables_init() and ts_resortTable()
Added missing variable declarations for ARROW, dt, mtstr, yr, etc.
5. Performance Issues ✅
Optimized file operations by using context managers
Reviewed and confirmed existing code already handles most performance concerns appropriately
Improved cache file handling to be more robust
6. Configuration and Path Validation ✅
Added comprehensive git repository validation (existence, directory check, .git folder verification)
Added output directory validation with permission checks
Enhanced configuration parsing with type validation and range checks
Added better error messages for invalid configurations
Key Improvements Made
Better Error Messages: All error conditions now provide clear, actionable feedback
Input Validation: Added checks for git repositories, output directories, and configuration values
Robust File Handling: Using context managers and proper exception handling
Security Hardening: Basic command injection detection and safer file operations
Code Quality: Fixed JavaScript variable scope issues and improved maintainability
This sorts tables on the authors and files pages.
Slightly modifies the sortable.js to ignore additional info in
parentheses after a number.
Signed-off-by: Heikki Hokkanen <hoxu@users.sf.net>
This adds the sortable table JavaScript from
http://yoast.com/articles/sortable-table/ (version 1.5.7) and some
helper images from the same site.
[hoxu@users.sf.net: The license linked from sortable.js and the one linked from
yoast.com (to opensource.org) differ a bit (the middle sentence about
copyright/permissions notice is not in the first), so I'm including a verbatim
copy-paste from http://www.kryogenix.org/code/browser/licence.html here:
-----
Copyright (c) 1997-date Stuart Langridge
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-----
With the addition that Joost De Valk has improved the script.]
Signed-off-by: Heikki Hokkanen <hoxu@users.sf.net>