Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doesn't manage_object function cause infinite loop? #1694

Open
superboy-zjc opened this issue Jan 31, 2025 · 0 comments
Open

doesn't manage_object function cause infinite loop? #1694

superboy-zjc opened this issue Jan 31, 2025 · 0 comments
Labels
bug Something isn't working potential Unconfirmed issue

Comments

@superboy-zjc
Copy link

superboy-zjc commented Jan 31, 2025

Code at here:

def manage_object(self, object, attr, init, callback=None):

    def manage_object(self, object, attr, init, callback=None):
        """
        This is a quick-fix copy of Opinel's manage_dictionary in order to support the new ScoutSuite object which isn't
        a dict
        """
        if type(object) == dict:
            if not str(attr) in object:
                object[str(attr)] = init
                self.manage_object(object, attr, init)
        else:
            if not hasattr(object, attr):
                setattr(object, attr, init)
                self.manage_object(object, attr, init)
        if callback:
            callback(getattr(object, attr))
        return object
@superboy-zjc superboy-zjc added bug Something isn't working potential Unconfirmed issue labels Jan 31, 2025
dbsectrainer added a commit to dbsectrainer/ScoutSuite that referenced this issue Feb 3, 2025
- Remove unnecessary recursive calls in manage_object function
- Add proper callback handling for both dict and object cases
- Add comprehensive test suite to verify functionality
- Improve documentation and type hints
dbsectrainer added a commit to dbsectrainer/ScoutSuite that referenced this issue Feb 3, 2025
- Remove unnecessary recursive calls in manage_object function
- Add proper callback handling for both dict and object cases
- Add comprehensive test suite to verify functionality
- Improve documentation and type hints
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working potential Unconfirmed issue
Projects
None yet
Development

No branches or pull requests

1 participant