1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 19:05:37 +08:00

Add license headers and sanitise open profile argument.

This commit is contained in:
naoey 2018-02-26 09:38:37 +05:30
parent 1ad45b0941
commit 5724618b2a
No known key found for this signature in database
GPG Key ID: 3908EC682A3E19C7
4 changed files with 14 additions and 4 deletions

View File

@ -93,7 +93,8 @@ namespace osu.Game.Graphics.Containers
Process.Start(url);
break;
case LinkAction.OpenUserProfile:
userProfile?.ShowUser(Convert.ToInt64(linkArgument));
if (long.TryParse(linkArgument, out long userId))
userProfile?.ShowUser(userId);
break;
default:
throw new NotImplementedException($"This {nameof(LinkAction)} ({linkType.ToString()}) is missing an associated action.");

View File

@ -1,4 +1,7 @@
using Newtonsoft.Json;
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using Newtonsoft.Json;
using osu.Game.Rulesets.Scoring;
using Humanizer;
using System;

View File

@ -1,4 +1,7 @@
using osu.Framework.Allocation;
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Graphics;

View File

@ -1,4 +1,7 @@
using osu.Framework.Configuration;
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Configuration;
using osu.Framework.Graphics;
using osu.Game.Online.API.Requests;
using osu.Game.Users;