Skip to content

Fix eval() security risk, input validation, and symbol typos in Converter - #446

Open
Prayas340 wants to merge 1 commit into
ndleah:mainfrom
Prayas340:fix/converter-eval-bug
Open

Fix eval() security risk, input validation, and symbol typos in Converter#446
Prayas340 wants to merge 1 commit into
ndleah:mainfrom
Prayas340:fix/converter-eval-bug

Conversation

@Prayas340

Copy link
Copy Markdown

Description

A short summary of what is included in your Pull Request.

Refactored Converter/converter.py to eliminate eval(), introduced safe dictionary lookups via CATEGORIES, added input validation for unit symbols/categories/values, and corrected symbol typos in Converter/converter_values.py.

  • Issue_no:
  • Not applicable

Type of change

Choosing one or more options from the following as per the nature of your Pull request.

  • New project insert
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Documentation Update

Project

  • Your Project Name: Converter

  • Short Description: A Python command-line utility for converting length, area, volume, mass, and time units.

Checklist:

  • I have named my files and folder, according to this project's guidelines.
  • My code follows the style guidelines of this project.
  • I have commented on my code, particularly in hard-to-understand areas.
  • I have created a helpful and easy to understand README.md, according to the given README_TEMPLATE.
  • My changes do not produce any warnings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant