Skip to content

Commit

Permalink
Update CHANGELOG.md, Hotfix rolling back checking magic number for syms
Browse files Browse the repository at this point in the history
Add word fixed


Hotfix rolling back checking magic number for symbols

Needs more testing, as it broke symbol uploads.
  • Loading branch information
jameskr97 committed Sep 25, 2021
1 parent a244e42 commit aa62448
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.2.0.4] - 2021-09-25
### Added
- Added `.docker` folder, which defines a docker based development environment.
- Redis+RQ task queue to decode minidumps
- Added prism.js for code formatting (though feature is WIP)

### Changed
- Updated Crash Report page to look cleaner and show dump metadata or decode progress.
- Updated Crash Report page to have a slim view for mobile pages.

### Removed
- Huey as a task queue

### Fixed
- Fixed bug preventing from upload webpage from uploading minidumps

## [0.2.0.3] - 2021-09-19
### Fixed
- Flush symbol after stored in database to get "symbol_location" from project
Expand Down
8 changes: 1 addition & 7 deletions crashserver/webapp/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,8 @@ def upload_minidump(project):
def upload_symbol(project, version):
symbol_file = request.files.get("symbol_file")

# Ensure the uploaded file is plain text
symbol_file_bytes = symbol_file.stream.read()
magic_number = magic.from_buffer(symbol_file_bytes, mime=True)
if magic_number != "text/plain":
logger.error("Symbol rejected from {}. File detected as {}", request.remote_addr, magic_number)
return make_response({"error": "Bad symbol file."}, 400)

# Use charset_normalizer to get a readable version of the text.
symbol_file_bytes = symbol_file.stream.read()
char_res = char_norm.from_bytes(symbol_file_bytes)
decoded = char_res.best().output()
first_line_str = decoded[: decoded.find("\n".encode())].decode("utf-8")
Expand Down

0 comments on commit aa62448

Please sign in to comment.