Skip to content

Commit

Permalink
5.7.8
Browse files Browse the repository at this point in the history
- Move SVG validation errors from `["bimi"]["warnings"]` to `["bimi"]["image"]["validation_errors"]` (#150)
  • Loading branch information
seanthegeek committed Nov 2, 2024
1 parent 47940b0 commit 4c7e6f9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Changelog
=========

5.7.8
-----

- Move SVG validation errors from `["bimi"]["warnings"]` to `["bimi"]["image"]["validation_errors"]` (#150)

5.7.7
-----

Expand Down
2 changes: 1 addition & 1 deletion checkdmarc/_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
See the License for the specific language governing permissions and
limitations under the License."""

__version__ = "5.7.7"
__version__ = "5.7.8"

OS = platform.system()
OS_RELEASE = platform.release()
Expand Down
8 changes: 5 additions & 3 deletions checkdmarc/bimi.py
Original file line number Diff line number Diff line change
Expand Up @@ -567,13 +567,15 @@ def parse_bimi_record(
response.raise_for_status()
raw_xml = response.content
except Exception as e:
warnings.append(f"Unable to download {tag_value} - {str(e)}")
warnings.append(f"Failed to download BIMI image at {tag_value} - {str(e)}")
if raw_xml is not None:
try:
image_metadata = get_svg_metadata(raw_xml)
warnings += check_svg_requirements(image_metadata)
svg_validation_errors = check_svg_requirements(image_metadata)
if len(svg_validation_errors) > 0:
image_metadata["validation_errors"] = svg_validation_errors
except Exception as e:
warnings.append(str(e))
warnings.append(f"Failed to process BIMI image at {tag_value} - {str(e)}")
elif tag == "a" and tag_value != "":
cert_metadata = None
try:
Expand Down

0 comments on commit 4c7e6f9

Please sign in to comment.