Jump to content
McKay Development

cookie

Member
  • Posts

    62
  • Joined

  • Last visited

Posts posted by cookie

  1. Yes, it can be, i want to learn how i can find memory leak function(s). Do you have any idea?

     

    You are using memory therefore you are storing data in the memroy. you need to check what functions are you using that store data or fetch data. Does your bot is programmed to do a set of series every while? perhaps post a preview of your code so we can analyze.

  2. I just thought of a potential issue with using just the trade URL. Presently you have to construct an offer using a SteamID explicitly. Getting the ID from the URL opens sloppy implementations to the potential for users to send offers to other users.

     

    For example, a typical implementation currently has a user sign in through Steam's OpenID, then prompts the user for their trade URL. Both of these are sent to the bot. The offer is created using the authenticated SteamID, and the token is extracted from the URL. If the trade URL isn't for that user's account, the offer just fails.

     

    With the proposed new API, a user could enter someone else's trade URL. If the implementation doesn't check offer.partner, then unrelated users could receive unsolicited offers.

     

    Of course, we could add a note to the documentation to check offer.partner when you use a trade URL, but I don't really like the loss of the built-in safeguard.

     

    Extracting the token from a trade url isn't a big issue, however I would stick to tokens since it's straight forward. if the token isn't validated means the token doesn't belong to the SteamID provided or is invalid. extracting a token can be as simple as it sounds, but i believe the act of sending an offer via a trade url is more of a hassle than sending an offer via tokens (as it needs more functions).

  3. Thank you.

    One more question: when I am doing offer.send method and there is status "sent" I am receiving offer.id so I can create offer link for user.

    But there is delay like 0-5 seconds for this link after status is "sent".

    In this delay user is receiving: "An error was encountered while processing your request:".

    So if he will refresh this page in ~5 seconds everything will be ok.

    Is there any ways to check this delay or only way to fix this is manual timeout?

     

    it's because of steam, you can use:

    setTimeout(function(){displayOfferUrl();}, 7000);
    

    on the client side, replace displayOfferUrl() with your own function(s) that will display the trade url, it will show the url after 7 seconds.

  4. If you try to execute the bot using a user that doesn't have a home directory the application will crash on

    dataPath = path.join(process.env.HOME, ".local", "share", "{0}")
    

    perhaps check if process.env.HOME exists, otherwise set a fixed path?

×
×
  • Create New...