Merge remote-tracking branch 'origin/pr/1091'

master
Andrew DeMaria 5 years ago
commit 6baa2d09d6
No known key found for this signature in database
GPG Key ID: 0A3F5E91F8364EDF
  1. 2
      airsonic-main/src/main/java/org/airsonic/player/controller/AccessDeniedController.java
  2. 4
      airsonic-main/src/main/java/org/airsonic/player/controller/PodcastReceiverAdminController.java
  3. 2
      airsonic-main/src/main/java/org/airsonic/player/security/CustomUserDetailsContextMapper.java
  4. 3
      airsonic-main/src/main/java/org/airsonic/player/service/upnp/AlbumUpnpProcessor.java
  5. 2
      airsonic-main/src/main/java/org/airsonic/player/util/HttpRange.java

@ -21,7 +21,7 @@ public class AccessDeniedController {
@GetMapping
public ModelAndView accessDenied(HttpServletRequest request, HttpServletResponse response) {
LOG.info("The IP {0} tried to access the forbidden url {1}.", request.getRemoteAddr(), request.getRequestURL());
LOG.info("The IP {} tried to access the forbidden url {}.", request.getRemoteAddr(), request.getRequestURL());
return new ModelAndView("accessDenied");
}

@ -56,11 +56,11 @@ public class PodcastReceiverAdminController {
podcastService.createChannel(url);
return new ModelAndView(new RedirectView("podcastChannels.view"));
}
if (request.getParameter("downloadEpisode") != null) {
if (request.getParameter("downloadEpisode") != null && channelId != null) {
download(StringUtil.parseInts(request.getParameter("downloadEpisode")));
return new ModelAndView(new RedirectView("podcastChannel.view?id=" + channelId));
}
if (request.getParameter("deleteChannel") != null) {
if (request.getParameter("deleteChannel") != null && channelId != null) {
podcastService.deleteChannel(channelId);
return new ModelAndView(new RedirectView("podcastChannels.view"));
}

@ -110,7 +110,7 @@ public class CustomUserDetailsContextMapper implements UserDetailsContextMapper
public void mapUserToContext(UserDetails user, DirContextAdapter ctx) {
throw new UnsupportedOperationException(
"LdapUserDetailsMapper only supports reading from a context. Please"
"LdapUserDetailsMapper only supports reading from a context. Please "
+ "use a subclass if mapUserToContext() is required.");
}

@ -38,6 +38,7 @@ import org.springframework.web.util.UriComponentsBuilder;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.ArrayList;
import java.util.List;
/**
@ -120,6 +121,8 @@ public class AlbumUpnpProcessor extends UpnpContentProcessor <Album, MediaFile>
albumList = ap.getChildren(ap.getItemById(album.getComment().replaceAll(ALL_BY_ARTIST + "_", "")));
} else if (album.getComment().equalsIgnoreCase(ALL_RECENT)) {
albumList = getDispatcher().getRecentAlbumProcessor().getAllItems();
} else {
albumList = new ArrayList<>();
}
for (Album a: albumList) {
if (a.getId() != -1) {

@ -56,7 +56,7 @@ public class HttpRange {
String firstString = matcher.group(1);
String lastString = StringUtils.trimToNull(matcher.group(2));
Long first = Long.parseLong(firstString);
long first = Long.parseLong(firstString);
Long last = lastString == null ? null : Long.parseLong(lastString);
if (last != null && first > last) {

Loading…
Cancel
Save