Git Product home page Git Product logo

net.tmdb's People

Contributors

antonzelinsky avatar mend-bolt-for-github[bot] avatar miguelhasse avatar qmatteoq avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

net.tmdb's Issues

Not getting back Status

I am doing an initial search for Movies with a search term ("Scorpion King" to be exact) and am getting no Status field value, just null. My app does not need to show Released movies in the search results. Do I have to get individual results to get the Status? Am I just supposed to figure it out with the Release Date value?

No response in Xamarin.Android

I have a solution with a Xamarin.iOS and a Xamarin.Android project. Both of them have a reference to Hasseware.Net.TMDb. The class that uses the .Net.TMDb library is in a shared project, which both the iOS and the Droid project also have a reference to.

This work fine in the iOS app, but when I run the Android app (whose functionality is identical to the iOS app), I do not get any response back when I call this function (or any other .Net.TMDb function, for that matter):

public async Task GetMoviesAsync(string query)
{
var movies = await this._client.Movies.SearchAsync(query, "en", true, null, true, 1, new CancellationToken());
return movies;
}

Any idea what can be the problem?

Attempted to bring this .net maui 6.0 but failed doing Top rated movie request

I ended up doing the request by hand

	{
		HttpClient client = new HttpClient();
		Uri uri = new Uri(string.Format(Constants.RestUrl, "api_key=<APIKEY>&language=en-US&page=" + page));

		try
		{
			string text = await client.GetStringAsync(uri, cancellationToken);
			Console.WriteLine("Result Movie: " + text);
		}
		catch (HttpRequestException httpRequestException)
		{
			Console.WriteLine("Status code:" + httpRequestException.StatusCode);
			throw;
		}
	}```

Can you provide sample ?

Hello,

I am currently looking to use your library. I have issue with the cancellationToken.
I think I miss some skills with this object.

Can you provide a working sample to show how to use it ?

Thank you for your work.

Not getting back runtime

OK, I think this one is for real. I am now getting back movies individually and getting all "sub-lists" populated and it appears that every runtime on every movie is populated with null.

Movie rating retrieval sample?

Hey, could you please provide a sample where the app searches for a movie title from a user string and then displays its rating?

I ask because I want to build a small solution that gets all movies from folder names, loads their title in a tree view and displays their ratings as child nodes in the tree, so that I can easily delete the ones with the lowest scores (its a huge collection!).

Thanks so much in advance!!!

Issue retrieving casts

Also, I'm having trouble with getting Casts. Is this supposed to work? I keep getting an "Object reference not set to an instance of an object." error.

List list = (await GetMovies()).Select(m => new MovieViewModel()
{
ID = m.Id,
ImdbID = m.Imdb,

                Status = m.Status,

                Title = m.Title,
                Description = m.Overview,
                Cast = m.Credits.Cast.Select(c => c.Name).ToList(),
                ReleaseDate = m.ReleaseDate,

                PosterPath = string.Format("https://image.tmdb.org/t/p/w185{0}", m.Poster),
                //BackDropPath = string.Format("https://image.tmdb.org/t/p/w780{0}", m.Backdrop)

            }).ToList();

WS-2022-0161 (High) detected in newtonsoft.json.6.0.6.nupkg, newtonsoft.json.10.0.3.nupkg

WS-2022-0161 - High Severity Vulnerability

Vulnerable Libraries - newtonsoft.json.6.0.6.nupkg, newtonsoft.json.10.0.3.nupkg

newtonsoft.json.6.0.6.nupkg

Json.NET is a popular high-performance JSON framework for .NET

Library home page: https://api.nuget.org/packages/newtonsoft.json.6.0.6.nupkg

Path to dependency file: /Hasseware.Net.TMDb.csproj

Path to vulnerable library: /packages.config,/src/Net.TMDb.Portable/packages.config

Dependency Hierarchy:

  • โŒ newtonsoft.json.6.0.6.nupkg (Vulnerable Library)
newtonsoft.json.10.0.3.nupkg

Json.NET is a popular high-performance JSON framework for .NET

Library home page: https://api.nuget.org/packages/newtonsoft.json.10.0.3.nupkg

Path to dependency file: /.nuget/TheMovieDB.nuspec

Path to vulnerable library: /.nuget/TheMovieDB.nuspec

Dependency Hierarchy:

  • โŒ newtonsoft.json.10.0.3.nupkg (Vulnerable Library)

Found in base branch: master

Vulnerability Details

Newtonsoft.Json prior to version 13.0.1 is vulnerable to Insecure Defaults due to improper handling of expressions with high nesting level that lead to StackOverFlow exception or high CPU and RAM usage. Exploiting this vulnerability results in Denial Of Service (DoS). \n\nThe serialization and deserialization path have different properties regarding the issue.\n\nDeserializing methods (like JsonConvert.DeserializeObject) will process the input that results in burning the CPU, allocating memory, and consuming a thread of execution. Quite high nesting level (>10kk, or 9.5MB of {a:{a:{... input) is needed to achieve the latency over 10 seconds, depending on the hardware.\n\nSerializing methods (like JsonConvert.Serialize or JObject.ToString) will throw StackOverFlow exception with the nesting level of around 20k.\n\nTo mitigate the issue one either need to update Newtonsoft.Json to 13.0.1 or set MaxDepth parameter in the JsonSerializerSettings. This can be done globally with the following statement. After that the parsing of the nested input will fail fast with Newtonsoft.Json.JsonReaderException:\n\n \nJsonConvert.DefaultSettings = () => new JsonSerializerSettings { MaxDepth = 128 };\n\n\nRepro code:\n\n//Create a string representation of an highly nested object (JSON serialized)\nint nRep = 25000;\nstring json = string.Concat(Enumerable.Repeat(\"{a:\", nRep)) + \"1\" +\n string.Concat(Enumerable.Repeat(\"}\", nRep));\n\n//Parse this object (leads to high CPU/RAM consumption)\nvar parsedJson = JsonConvert.DeserializeObject(json);\n\n// Methods below all throw stack overflow with nRep around 20k and higher\n// string a = parsedJson.ToString();\n// string b = JsonConvert.SerializeObject(parsedJson);\n\n\n### Additional affected product and version information\nThe original statement about the problem only affecting IIS applications is misleading. Any application is affected, however the IIS has a behavior that stops restarting the instance after some time resulting in a harder-to-fix DoS.**

Publish Date: 2022-06-22

URL: WS-2022-0161

CVSS 3 Score Details (7.5)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: Low
    • Privileges Required: None
    • User Interaction: None
    • Scope: Unchanged
  • Impact Metrics:
    • Confidentiality Impact: None
    • Integrity Impact: None
    • Availability Impact: High

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Release Date: 2022-06-22

Fix Resolution: Newtonsoft.Json - 13.0.1;Microsoft.Extensions.ApiDescription.Server - 6.0.0


Step up your Open Source Security Game with Mend here

Possible to remove the 'internal set' of model properties?

I'm building a small home-brew project making use of your great library to interact with Tmdb. Firstly - thanks v much, it works great!

I wish to extend the models slightly to add/set some properties but with the 'internal' modifier I'm not able to. Just wondered if its absolutely necessary to have them like this or you could make them open and extendable models? Would make things a bit easier.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.